CWindow::EnableWindow

BOOL EnableWindow( BOOL bEnable = TRUE );

See EnableWindow in the Win32 SDK.

Remarks

Enables or disables input.

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::EnableWindow() to enable and disable the window
//wrapped by the CWindow object

CWindow myWindow;
myWindow.Attach(hWndFoo);

//The following call enables the window 
//CWindow::EnableWindow() takes TRUE as the default parameter

BOOL bEnable  = myWindow.EnableWindow();

if(bEnable)
{
//Do something now that the window is enabled
...
...
//Now it's time to disable the window again
bEnable = myWindow.EnableWindow(FALSE);
}

CWindow OverviewClass Members

See Also   CWindow::IsWindowEnabled