Name

Public Const WM_SYSCOMMAND = &H112

Synopsis

wParam

Indicates the action initiated by the user; can be one of the following, defined in Appendix C:

SC_CLOSE
SC_CONTEXTHELP
SC_DEFAULT
SC_HOTKEY
SC_HSCROLL
SC_KEYMENU
SC_MAXIMIZE
SC_MINIMIZE
SC_MONITORPOWER
SC_MOUSEMENU
SC_MOVE
SC_NEXTWINDOW
SC_PREVWINDOW
SC_RESTORE
SC_SCREENSAVE
SC_SIZE
SC_TASKLIST
SC_VSCROLL
lParam

The low-order word contains the x-coordinate of the mouse pointer if a menu item is selected; otherwise, it is not used. The high-order word contains the y-coordinate of the mouse pointer if a menu item is selected by the mouse; it is -1 if an accelerator is used to access the menu item, or it is if a mnemonic is used to access the menu item.

Description

Sent when a menu item is selected from the Window menu, the Minimize button is clicked, the Maximize button is clicked, the Restore button is clicked, or the Close button is clicked.

Return Value

0 only if the application processes this message.

Get Subclassing and Hooking with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.