Author | Message | Time |
---|---|---|
LordVader | When you click the "minimize" button uptop right of an application does that send a specific WM_message command that can be interprited so can make it also: [code] ShowWindow(hwnd, SW_HIDE); [/code] WM_MINIMIZE? looked at msdn WM_Message list didn't see anything like that heh Nvm Found it: WM_SYSCOMMAND: [code] SC_CLOSE Close the CWnd object. SC_HOTKEY Activate the CWnd object associated with the application-specified hot key. The low-order word of lParam identifies the HWND of the window to activate. SC_HSCROLL Scroll horizontally. SC_KEYMENU Retrieve a menu through a keystroke. SC_MAXIMIZE (or SC_ZOOM) Maximize the CWnd object. SC_MINIMIZE (or SC_ICON) Minimize the CWnd object. SC_MOUSEMENU Retrieve a menu through a mouse click. SC_MOVE Move the CWnd object. SC_NEXTWINDOW Move to the next window. SC_PREVWINDOW Move to the previous window. SC_RESTORE Restore window to normal position and size. SC_SCREENSAVE Executes the screen-saver application specified in the [boot] section of the SYSTEM.INI file. SC_SIZE Size the CWnd object. SC_TASKLIST Execute or activate the Windows Task Manager application. SC_VSCROLL Scroll vertically. [/code] By default, OnSysCommand carries out the Control-menu request for the predefined actions specified in the preceding table. In WM_SYSCOMMAND messages, the four low-order bits of the nID parameter are used internally by Windows. When an application tests the value of nID, it must combine the value 0xFFF0 with the nID value by using the bitwise-AND operator to obtain the correct result. | September 3, 2004, 12:27 AM |
UserLoser. | WM_SIZE is what you're looking for. If (wParam == SIZE_MINIMIZED), then window is minimized. There's also SIZE_MAXIMIZED (when it becomes maximized, obviously), and a few others, iirc. Edit: Typo. | September 3, 2004, 7:30 PM |
LordVader | Thx, ;D | September 4, 2004, 2:21 AM |