WM SETFOCUS: Difference between revisions
Appearance
Line 27: | Line 27: | ||
===Language Support Dialog=== | ===Language Support Dialog=== | ||
The Language Support Dialog Procedure responds to this message by issuing the WinDefDlgProc function, then posting a WM_PSETFOCUS message to the application queue and setting ulReserved to the result of the WinDefDlgProc function. | The Language Support Dialog Procedure responds to this message by issuing the [[WinDefDlgProc]] function, then posting a WM_PSETFOCUS message to the application queue and setting ulReserved to the result of the WinDefDlgProc function. | ||
===Language Support Window=== | ===Language Support Window=== |
Latest revision as of 00:45, 14 April 2025
This message occurs when a window is to receive or lose the input focus.
Syntax
param1 HWND hwnd; /* Focus-window handle. */ param2 USHORT usfocus; /* Focus flag. */
Parameters
- hwnd (HWND) - input
- Focus-window handle.
- NULLHANDLE: No window is losing or receiving the focus.
- Other: Window handle.
- usfocus (USHORT) - input
- Focus flag.
- TRUE: The window is receiving the focus. hwnd is the window handle of the window losing the focus, or NULLHANDLE if no window previously had the focus.
- FALSE: The window is losing the focus. hwnd is the window handle of the window receiving the focus, or NULLHANDLE if no window is receiving the focus.
Returns
- ulReserved (ULONG) - returns
- Reserved value, should be 0.
Remarks
This message is sent to the window receiving or losing the focus, thereby giving it the opportunity to perform some appropriate processing.
- Note:
- Except in the instance of WM_ACTIVATE, with usactive set to TRUE, an application processing WM_SETFOCUS or WM_ACTIVATE messages should not change the focus window or active window. If it does, the focus and active window must be restored before the application returns from processing the message. For this reason, any dialog boxes or windows brought up during the processing of WM_SETFOCUS or WM_ACTIVATE messages should be system modal.
Language Support Dialog
The Language Support Dialog Procedure responds to this message by issuing the WinDefDlgProc function, then posting a WM_PSETFOCUS message to the application queue and setting ulReserved to the result of the WinDefDlgProc function.
Language Support Window
The Language Support Window Procedure responds to this message by posting a WM_PSETFOCUS message to the application queue and setting ulReserved to 0.
Default Processing
The default window procedure takes no action on this message, other than to set ulReserved to 0.
Related Messages
- WM_SETFOCUS (Language Support Dialog)
- WM_SETFOCUS (Language Support Window)