Solved

Removing ok cancel apply button in property sheet

Posted on 2001-08-24
7
1,257 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Strange date stored 22 106
Pressing cancel button with C# UI Automation 3 51
Process filename extension 3 172
twoTwo  challenge 35 93
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

912 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

23 Experts available now in Live!

Get 1:1 Help Now