How To Disable Push Buttons on a DialogBar in MFCLast reviewed: July 31, 1997Article ID: Q152376 |
1.00 1.50 1.51 1.52 | 1.00 2.00 2.10 2.20 4.00 4.10
WINDOWS | WINDOWS NTkbprg kbhowto The information in this article applies to:
SUMMARYPush-button controls on a DialogBar cannot be disabled by calling EnableWindow. The following code has no effect:
GetDlgItem(IDC_BUTTON1)->EnableWindow(FALSE);This article describes how to implement push-button controls that can be disabled.
MORE INFORMATIONControls on a DialogBar behave like the bitmaps on a Toolbar. They can be enabled or disabled by manually adding an ON_UPDATE_COMMAND_UI within the message map of the appropriate class (such as CMainFrame).
Step-by-Step ExampleAfter you have placed a control on your DialogBar, such as a push-button with a resource ID of IDC_BUTTON1, use the following steps to manage the state of the control:
|
Additional reference words: 1.00 1.50 1.51 1.52 2.00 2.10 2.20 4.00 4.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |