Solved

Removing ok cancel apply button in property sheet

Posted on 2001-08-24
7
1,342 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: 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!

 

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

Industry Leaders: 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

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: 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.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

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