Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling a Push Button

I have an app that it makes sense to make one of the push buttons disabled
at startup
and after a user action is taken, it may make sense to enable the buton. I
know how to disable the button both via resource settings and
programmatically. How the heck fo you programmatically enable a pucsh
button? There is no inverse style setting for WS_DISABLED

Thanks
-Mark
0 Kudos
Message 1 of 3
(3,019 Views)
Add a CButton member variable to your dialog class for the button, then call CButton's EnableWindow method with FALSE to disable the button and with TRUE to enable the button.

- Elton
0 Kudos
Message 2 of 3
(3,019 Views)
Thanks you so much. That works like a dream.

As a BTW:
If you know of any really useful sites for skilled developers (18+ years)
who
are just new to the MS way of doing things, please point me to them.

Anyhow, many thanks to you!

-Mark


"Elton Wells" wrote in message
news:506500000005000000EFB10000-1031838699000@exchange.ni.com...
> Add a CButton member variable to your dialog class for the button,
> then call CButton's
>
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib
/html/_mfc_CWnd.3a3a.En...

> method with FALSE to disable the button and with TRUE to enable the
> button.
>
> - Elton
0 Kudos
Message 3 of 3
(3,019 Views)