I know about WM_SIZE
and WM_SIZING
, but is there a message that is sent when the user maximizes or minimizes the window by using system menu?
I need to capture this event in my project and I'm not able to google out what would be the message.
WM_SIZE description: Sent to a window after its size has changed. The wParam contains the reason:
SIZE_MAXIMIZED The window has been maximized. SIZE_MINIMIZED The window has been minimized. SIZE_RESTORED The window has been resized, but neither the SIZE_MINIMIZED nor SIZE_MAXIMIZED value applies.
In short, WM_SIZE is sent no matter what causes the resize. Clicking on the maximize button is equal to selecting the maximize option from the system menu.
If you, for some reason, want to distinguish the mouse click from the menu selection, you can use WM_NCMOUSEMOVE to detect the mouse going to the upper right.