Solved

Removing ok cancel apply button in property sheet

Posted on 2001-08-24
7
1,279 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Turn a spreadsheet into a vba executable. 2 85
Separate files macro - Errors on larger data set 18 69
pre4 challenge 19 100
sumHeights2  challenge 7 102
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

808 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