Is there a specific message I can look for from any place in my program to determine when the program's taskbar button has been pressed?
My primary window is opened as:
with a lpClassName of mainWin
WS_POPUP | WS_SYSMENU | WS_MINIMIZEBOX | WS_VISIBLE
After this window is opened there are a bunch of other windows opened as:
Now, lets say that the active window and focus is set on a subName window. When I click on the program's taskbar button to minimize the program, it does not minimize but instead just sets focus to mainWin. I have to click on the taskbar button again to get the WM_SIZE message needed to minimize.
CreateWindowEx( WS_EX_TOOLWINDOW, subName, NULL, WS_POPUP, ...
So, is there a way I can detect, from the sub window, when the taskbar button is clicked to minimize the program? I think I want to send something like a TB_PRESSBUTTON to the mainWin from the subWin but I don't know how to get the subWin to detect the press of the program's taskbar button.