Disable cancel button using SetWizardButtons

Posted on 1998-03-19
Last Modified: 2008-02-01
In the doc, the params PSWIZB_BACK, NEXT, FINISH,  and DISABLEDFINISH are the only choices.  My wizard page displays a Back, Finish and Cancel button using the CPropertySheet.  How do i disable/gray out the cancel button?  Is there a param for that?  
Question by:lousy
  • 3

Accepted Solution

jtwine100697 earned 200 total points
ID: 1183654
  Try This:

    CWnd    *pWnd = GetDlgItem( IDCANCEL );   // Get [Cancel]

    if( pWnd )                                // If We Got The Button
        pWnd -> EnableWindow( FALSE );        // Disable It

-=- James.


Expert Comment

ID: 1183655
  BTW: Some of the "experts" here will not answer questions that "don't have enough points".  Bear that in mind, you might get an answer sooner! :P

-=- James.

Author Comment

ID: 1183656
Thanks!  I will try it out and let you know.  I appreciate the tip.  I just joined and do not know that the points are for experts to answer the question.  I thought the points is related to the degree of difficulty.  Have a great day!

Expert Comment

ID: 1183657
  First, you should not have accepted my answer without first trying it out! :P  But thanx for adding points to it before accepting the answer.

   Points do relate to the degree of difficulty, but questions that have a zero point value (as your did) might sit around for a bit.

   Please try my idea out, and post your results, so I can know that everything is working for you.

-=- James.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

733 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