Real Simple: Enabling/disabling buttons on Dialog boxes 
Author Message
 Real Simple: Enabling/disabling buttons on Dialog boxes

Hello all,

Given a dialog box, with several buttons, how would I, in my code, enable/disable these buttons, when I need to? I'm new to MFC, and have searched MSDN, and haven't found anything on this.  

Thanks!

Randy



Sun, 27 Jan 2002 03:00:00 GMT  
 Real Simple: Enabling/disabling buttons on Dialog boxes
Get a pointer to your button (using GetDlgITem) and then use EnableWindow()
to enable/disable window.

--
Ajay Kalra


    Hello all,

    Given a dialog box, with several buttons, how would I, in my code,
enable/disable these buttons, when I need to? I'm new to MFC, and have
searched MSDN, and haven't found anything on this.

    Thanks!

    Randy



Sun, 27 Jan 2002 03:00:00 GMT  
 Real Simple: Enabling/disabling buttons on Dialog boxes

Randy,

Try using the EnableWindow method found in the CWnd base class.

Regards!

Mark

    Hello all,

    Given a dialog box, with several buttons, how would I, in my code, enable/disable these buttons, when I need to? I'm new to MFC, and have searched MSDN, and haven't found anything on this.

    Thanks!

    Randy



Sun, 27 Jan 2002 03:00:00 GMT  
 Real Simple: Enabling/disabling buttons on Dialog boxes

Thanks guys!  looks like that works.

  Hello all,

  Given a dialog box, with several buttons, how would I, in my code, enable/disable these buttons, when I need to? I'm new to MFC, and have searched MSDN, and haven't found anything on this.

  Thanks!

  Randy



Sun, 27 Jan 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. File Open Dialog - Open button Enable&Disable

2. File Open Dialog - Open button Enable&Disable

3. How to enable/disable Toolbar button in Dialog Based MFC application

4. File Open Dialog - Open button Enable&disable

5. enable/disable toolbar button using pCmdUI->Enable(TRUE/FALSE) doesnt work

6. Enabling/Disabling a dialog Button

7. Enabling and disabling controls in a dialog box

8. Enabling/Disabling Dialog Edit boxes

9. Disabling button in a dialog box

10. Disable a Dialog box button

11. How to disable buttons in a dialog box ?

12. Disable a Dialog box button

 

 
Powered by phpBB® Forum Software