Solved

Button Enable/Disable

Posted on 1997-04-28
2
403 Views
Last Modified: 2010-04-10
I am working in VC++4.1/win95. In a dialog class i have buttons like OK, CANCEL, etc. I want to make these button disable/enable at runtime. How to do this?
0
Comment
Question by:jayku
2 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 20 total points
ID: 1163020
void CYourDialog::YourMemberFunction()
{
    this->GetDlgItem(nButtonID)->EnableWindow( TRUE);
   // or this->GetDlgItem(nButtonID)->EnableWindow( FALSE);
}

0
 

Author Comment

by:jayku
ID: 1163021
Thanks
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question