Jump to content

WM ENABLE

From EDM2
Revision as of 19:02, 19 May 2024 by Martini (talk | contribs) (Created page with "This message notifies a windows of a change to its enable state. ==Syntax== <PRE> param1 USHORT usnewenabledstate New enabled state indicator.: param2 UL...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This message notifies a windows of a change to its enable state.


Syntax

param1
     USHORT  usnewenabledstate  /*  New enabled state indicator. */

param2
     ULONG   ulReserved         /*  Reserved value, should be 0. */

Parameters

usnewenabledstate (USHORT)
New enabled state indicator.
TRUE
The window was set to the enabled state.
FALSE
The window was set to the disabled state.
ulReserved (ULONG)
Reserved value, should be 0.

Returns

ulReserved (ULONG)
Reserved value, should be 0

Remarks

This message is sent to the window procedure of the window whose enable state has been changed, thereby giving it an opportunity to perform some action appropriate to new state of the window.

This is just a notification message. If you want to change the enable state of a window, you would use WinEnableWindow

in Button Controls
This message notifies the button control window procedure of a change in the enable state of the button.
in Multiline Entry Fields
The multi-line entry field control window procedure responds to this message by setting the enable state and by setting ulReserved to 0.
Disabling the window is similar, but not identical, to MLM_DISABLEREFRESH. Enabling the window is similar, but not identical, to MLM_ENABLEREFRESH. (Note that this also applies to window styles.) The difference is that a disabled window receives no mouse or keyboard input whereas with MLM_DISABLEREFRESH it receives the input but discards it.

Default Processing

The default window procedure takes no action on this message, other than to set ulReserved to 0.