Two quick questions about buttons

geigermatt
geigermatt used Ask the Experts™
on
1) I need to know a way to disable a button.  Its just a regular button, when its clicked it does a function and afterwards I want it to be disabled.  Later I want to reenable the button.
2)Is there a quick way to change the color of buttons?  A simple blue would do.  Does anyone know?  
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
In your dialog,

//Disables button
GetDlgItem(IDC_BUTTON1)->EnableWindow(FALSE) ;

//Enables button
GetDlgItem(IDC_BUTTON1)->EnableWindow() ;

See OnCtlColor for changing control colors.

Regards,
Priyesh

Author

Commented:
muchos gracias :)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial