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_QUERYFOCUSCHAIN (1.2)
Message Group  Overview                           Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINFRAMEMGR
 
WM_QUERYFOCUSCHAIN
fCmd = (USHORT) SHORT1FROMMP(mp1);  /* command flag    */
hwndFocus = HWNDFROMMP(mp2);        /* focus-window ID */
 
The WM_QUERYFOCUSCHAIN message is sent to query the next window in the focus
chain, to query the active window if the supplied window was given focus, or
to query which window should be activated if the supplied window was
selected (from Task Manager, or by pressing ALT+ESC).
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
fCmd       Low word of mp1. Specifies the action to be performed. This
           parameter can be one of the following values:
 
           Value             Meaning
           ─────────────────────────────────────────────────────────────────
           QFC_ACTIVE        Return the frame window that would be activated
                             if that window were to be given the input focus
                             (or conversely, the window that would be
                             deactivated if the focus were taken away).
 
           QFC_FRAME         Return the first frame window associated with
                             the window.
 
           QFC_NEXTINCHAIN   Return the next window in the focus chain.
 
           QFC_SELECTACTIVE  Return the window that should be activated if
                             the window receiving the message were selected
                             from Task Manager or by ALT+ESC processing. For
                             example, a disabled frame window that has an
                             owned dialog box would return the window handle
                             of the dialog box. This option is used by Task
                             Manager and in similar situations to activate
                             an application or owner group rather than a
                             specific window.
 
                             By default, the top-most enabled and visible
                             window within the owner group should be
                             returned.
 
hwndFocus  Low and high word of mp2. Identifies the focus window.
 
Return Value
 
An application should return a window handle passed on the type of action
requested by the fCmd parameter.
 
See Also
 
WM_SETFOCUS