Jump to content

WM FOCUSCHANGE

From EDM2

This message occurs when the window possessing the focus is changed.

Syntax

param1
    HWND   hwndFocus;     /* Focus window handle. */

param2
    USHORT usSetFocus;    /* Focus flag. */
    USHORT fsFocusChange; /* Focus changing indicators. */

Parameters

hwndFocus (HWND) - input
Focus window handle.
usSetFocus (USHORT) - input
Focus flag.
TRUE: The window is receiving the focus and hwndFocus identifies the window losing the focus.
FALSE: The window is losing the focus and hwndFocus identifies the window receiving the focus.
fsFocusChange (USHORT) - input
Focus changing indicators. The indicators are passed from the WinFocusChange function.

Returns

ulReserved (ULONG) - returns
Reserved value, should be 0.

Remarks

This message is sent to both the windows gaining and losing the focus.

in Frame Controls

  • WM_SETFOCUS to the window losing the focus.
  • WM_SETSELECTION to the windows losing their selection.
  • WM_ACTIVATE to the windows being deactivated.
  • WM_ACTIVATE to the windows being activated.
  • WM_SETSELECTION to the windows being selected.
  • WM_SETFOCUS to the window receiving the focus.

Default Processing

The default window procedure sends this message to the owner or parent, if it exists and is not the desktop. Otherwise, it sets ulReserved to 0.

in Frame Controls

The default window procedure sends this message to either the owner, if one exists, or to the parent of the window, if it is not the desktop window, otherwise it sets ulReserved to 0.

Related Messages

  • WM_FOCUSCHANGE (in Frame Controls)