WM QUERYFOCUSCHAIN
Appearance
This message is used to request the handle of a window in the focus chain.
Syntax
param1 USHORT fsCmd; /* Command to be performed. */ param2 HWND hwndParent; /* Parent window. */
Parameters
- fsCmd (USHORT) - Input
- Command to be performed. This field contains a flag to indicate what action is to be performed:
- QFC_NEXTINCHAIN: Return the next window in the focus chain. The hwndParent parameter is not used.
- QFC_ACTIVE: Return the handle of the frame window that would be activated or deactivated, if this window gains or loses the focus. The window handle returned is a child of the window specified by the hwndParent parameter.
- QFC_FRAME: Return the handle of the first frame window associated with this window. The hwndParent parameter is not used.
- QFC_SELECTACTIVE: Return the handle of the window from the group of owned windows to which this window belongs which either currently has the focus or, if no window has the focus, previously had the focus. Return NULL, if no window in the owner group has had the focus. The hwndParent parameter is not used.
- QFC_PARTOFCHAIN: Return TRUE if the handle of the window identified by the hwndParent parameter is in the focus chain, otherwise return FALSE. Because this message is passed along the focus chain, this is equivalent to returning TRUE, if the handle of the window receiving this message is hwndParent or to returning FALSE, if it is not.
- hwndParent (HWND) - Input
- Parent window.
Returns
- hwndResult (HWND) - returns
- Handle of the window requested.
- 0: No window handle exists for this case of the fsCmd parameter. This value is also to be interpreted as FALSE for the case when the fsCmd is set to QFC_PARTOFCHAIN.
- Other: Handle of the window requested. This value is also to be interpreted as TRUE for the cases when the fsCmd is set to QFC_PARTOFCHAIN.
Remarks
The frame control window procedure responds to this message by returning the appropriate window handle, as described under the fsCmd field.
Default Processing
The default window procedure takes the same action as the frame control window procedure.