Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I disable a button.....?

Status
Not open for further replies.

CetGabbe

Programmer
Apr 12, 2002
18
0
0
SE
Good evening.

I've got a problem with a push button.
I want the button to be disabled when a special part of the code is running.
I have tried to create a member variable to the button (CButton-variable) but I can't find any useful function to use.

Greets CetGabbe.
 
The API for this is EnableWindow ( HWND hWnd, BOOL fEnable ).

To diable the button, call this one with fEnable set to FALSE.
 
CButton* pButton = (CButton*)GetDlgItem(IDC_BUTTON1);
pButton->EnabledWindow(FALSE);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top