Microsoft Foundation Classes (mfc.hlp) (
Table of Contents;
Topic list)
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.
CWnd::EnableWindow
◄CWnd► ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
BOOL EnableWindow( BOOL bEnable = TRUE );
Parameter Description
<bEnable> Specifies whether the given window is to be enabled or
disabled. If this parameter is TRUE, the CWnd will be
enabled. If this parameter is FALSE, the CWnd will be
disabled.
Remarks
Enables or disables mouse and keyboard input. When input is disabled,
input such as mouse clicks and keystrokes is ignored. When input is
enabled, the window processes all input.
If the enabled state is changing, the ◄WM_ENABLE► message is sent before
this function returns.
If disabled, all child windows are implicitly disabled, although they
are not sent ◄WM_ENABLE► messages.
CWnd must be enabled before it can be activated. For example, if an
application is displaying a modeless dialog box and has disabled its
main window, the main window must be enabled before the dialog box is
destroyed. Otherwise, another window will get the input focus and be
activated. If a child window is disabled, it is ignored when Windows
tries to determine which window should get mouse messages.
Initially, all windows are enabled by default. EnableWindow must be used
to disable CWnd explicitly.
Return Value
Indicates the state before the EnableWindow member function was called.
The return value is TRUE if CWnd was previously enabled. The return
value is FALSE if CWnd was previously disabled or an error occurred.
See Also
◄::EnableWindow►
-♦-