msgs12.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WM_SYSCOMMAND (1.2)
Message Group  Overview                           Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINMESSAGEMGR
 
WM_SYSCOMMAND
usCmd = (USHORT) SHORT1FROMMP(mp1);       /* command value */
fsSource = (USHORT) SHORT1FROMMP(mp2);    /* source type   */
fPointer = (BOOL) SHORT2FROMMP(mp2);      /* pointer flag  */
 
The WM_SYSCOMMAND message is sent when a control window has a command to
report to its owner or when a keystroke has been translated by an
accelerator table into a WM_SYSCOMMAND message. Typically, a WM_SYSCOMMAND
message is sent when the user selects an item from the system menu.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
usCmd      Low word of mp1. Specifies the command value. This can be one of
           the following values:
 
                SC_SIZE
                SC_MOVE
                SC_MINIMIZE
                SC_MAXIMIZE
                SC_CLOSE
                SC_NEXT
                SC_APPMENU
                SC_SYSMENU
                SC_RESTORE
                SC_NEXTFRAME
                SC_NEXTWINDOW
                SC_TASKMANAGER
                SC_HELPKEYS
                SC_HELPINDEX
                SC_HELPEXTENDED
                SC_SWITCHPANELIDS
                SC_DBE_FIRST
                SC_DBE_LAST
 
fsSource   Low word of mp2. Specifies the source type. This parameter can be
           one of the following values:
 
           Value               Meaning
           ─────────────────────────────────────────────────────────────────
           CMDSRC_ACCELERATOR  Posted as the result of an accelerator. The
                               usCmd parameter is the accelerator command
                               value.
 
           CMDSRC_MENU         Posted by a menu control. The usCmd parameter
                               is the identifier of the menu item.
 
           CMDSRC_PUSHBUTTON   Posted by a push-button control. The usCmd
                               parameter is the window identifier of the
                               push button.
 
           CMDSRC_OTHER        Other source. The usCmd parameter gives
                               further control-specific information defined
                               for each control type.
 
fPointer   High word of mp2. Specifies whether the message was posted as a
           result of a pointing-device (mouse) operation. A value of TRUE
           indicates a pointing device was used; FALSE indicates a keyboard
           operation.
 
Return Value
 
An application should return zero if it processes this message.
 
See Also
 
WM_COMMAND, WM_MENUSELECT, WM_TRANSLATEACCEL