Solved

Removing ok cancel apply button in property sheet

Posted on 2001-08-24
7
1,233 Views
Last Modified: 2013-11-20
I have a property sheet which has two tabs derived from CPropertySheet.At the bottom of this dialog i have the default ok,cancel and apply button.I don't want these default buttons,but i want to use the page dialog button to control.How can it be done
0
Comment
Question by:gymsam
  • 3
  • 3
7 Comments
 
LVL 9

Accepted Solution

by:
ShaunWilde earned 50 total points
ID: 6421802
you can get rid of the apply button using PSH_NOAPPLYNOW see http://support.microsoft.com/support/kb/articles/Q141/0/39.asp

or in your OnCreate of you sheet you can use GetDlgItem/ShowWindow(FALSE);

eg for apply

CWnd* pApplyButton = GetDlgItem (ID_APPLY_NOW);
   ASSERT (pApplyButton);
   pApplyButton->ShowWindow (SW_HIDE);

the ID for OK and CANCEL are IDOK and IDCANCEL

0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6421807
by the way I assume you pages are CPropertyPage derived not CPropertySheet
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6426015
Hi ShaunWilde,  
Please don't lock questions.  Just post comments like everybody else.  Thanks!

Hi gymsam,
If you Create a modeless CPropertySheet, none of the buttons appear at the bottom.  Then in the propety pages, you can call the CPropertySheet::PressButton() to get the effect of pressing these buttons that are not available.

But what you propose is non-standard UI.  People expect to see [Close] and [OK] at the bottom of a property sheet.  Why do you want to confuse them?

Anyway, you will need to put OK and Cancel buttons on each property page or else people will get *really* confused.

-- Dan
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:gymsam
ID: 6427230
Yes DanRollins i will try your suggestion soon and get back to you.
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6430081
> Please don't lock questions.  Just post comments like everybody else.  Thanks!

Hi Dan - actually since I thought it was an answer - then I am under the impression that it was okay to lock
0
 

Author Comment

by:gymsam
ID: 6430607
DanRollins
>But what you propose is non-standard UI.  People expect >to see [Close] and [OK] at the bottom of a property
>sheet.  Why do you want to confuse them?

What you say is right,but in my case i just display text in listbox of the page,the user can use x button on the top right conner of the window.

Mr.ShaunWilde comment is also right.So both of you are right.

0
 

Author Comment

by:gymsam
ID: 6430613
Since Mr.ShaunWilde's answered first i like to award him first.Thank you.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video discusses moving either the default database or any database to a new volume.

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now