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_ACTIVATE (1.2)
◄Message Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINMESSAGEMGR
WM_ACTIVATE
fActive = (BOOL) SHORT1FROMMP(mp1); /* activation/deactiv. flag */
hwnd = (HWND) HWNDFROMMP(mp2); /* window handle */
A WM_ACTIVATE message is sent when a window is being activated or
deactivated. This message is sent first to the window procedure of the main
window being deactivated and then to the window procedure of the main window
being activated.
Parameter Description
────────────────────────────────────────────────────────────────────────────
fActive Low word of mp1. Indicates whether the window is being activated
or deactivated. A value of TRUE means the window is being
activated. A value of FALSE indicates the window is being
deactivated.
hwnd Low and high word of mp2. Identifies the window being activated
or deactivated.
Return Value
An application should return zero if it processes this message.
Comments
When a window gains the focus, it receives a WM_ACTIVATE message, a
WM_SETSELECTION message, and a WM_SETFOCUS message (in that order). When the
window loses the focus, it receives a WM_SETFOCUS message, a
WM_SETSELECTION message, and a WM_ACTIVATE message (in that order).
See Also
WM_FOCUSCHANGE, WM_SETFOCUS, WM_SETSELECTION
♦