How to Restore from TaskBar a Minimized Window?

I am using Allegro 5 as my graphics library as I create various programs. Up to this point, without issue. However, I've run into a problem I can't seem to solve. When creating a frameless window through Allegro 5, it is not possible through Allegro 5 to minimize and maximize the window to/from the taskbar. The reason I want a frameless window is so I can completely control the interface without having the standard window frame (title, close, min, max buttons). This allows me to add style and color different from the standard windows frame.

My problem is I am trying to impliment my own minimize button. In order to accomplish this, I'm having to work outside Allegro 5 utilizing the Windows API which I'm struggling with. Here is what I have so far...

A class that creates a window (display) through Allegro 5 has the following method which successfully minimizes the window:
1
2
3
4
5
void window::minimize() {
  if (!_windowDisplay) return;
  SetParent(hWND(), NULL);
  ShowWindow(hWND(), SW_MINIMIZE);
}

The method hWND() returns the handle of the window (no issues here!)
The SetParent() clears the parent - I think the default is the IDE - but without this, the window icon won't show up in the taskbar.

This code will minimize the window to the taskbar, however I can't restore it. What Windows API method would allow me to both detect and action a 'click' on the window icon in the taskbar so that I can call ShowWindow(hWND(), SW_RESTORE)?
Topic archived. No new replies allowed.