Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Removing Cancel Button from CPropertySheet

Posted on 2004-04-25
12
Medium Priority
?
372 Views
Last Modified: 2013-11-20
Hi,

I wanted to remove Cancel Button from CPropertySheet

Please explain how to do this
thanks
sudha
0
Comment
Question by:sudhakar_koundinya
[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
  • 7
  • 4
12 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 10916160
Try
GetDlgItem(IDCANCEL)->ShowWindow(SW_HIDE);
to hide it.
0
 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 10917298
i already did that  and application raised assertion failure
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 100 total points
ID: 10917381
I did a small app, added a property sheet and put that in the OnInitDialog of the PropSheet.  No ASSERT, no CANCEL button.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 31

Assisted Solution

by:Zoppo
Zoppo earned 100 total points
ID: 10917529
> i already did that  and application raised assertion failure
What AndyAinscow suggested is correct, but you have to do it after the propertysheet is created, so, as AndyAinscow stated
a good place to do is the poperty sheet's OnInitDialog ... therefor you'll have to derive your own class from CPropertySheet,
add a OnInitDialog handler (ie. via ClassWizard) and add the given line of code after base class call to CPropertySheet::OnInitDialog
is done ...


hope that helps,

ZOPPO
0
 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 10917749
I did like this

//      (sht.GetDlgItem (IDCANCEL))->ShowWindow(SW_HIDE);
0
 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 10917755
and it wasn't worked
0
 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 10917773
OOPS

It worked now
I did it after creation of PropertySheet as Modal . Very Silly Mistake

Thanks
for pointing the problem
0
 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 10917793
AndyAinscow

Although you have commented the right thing, Zoppo pointed the problem.


May I Split the points equally for both you guys :-)
0
 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 10917804
>>after creation

It was before calling the DoModal()

Compulsorily should raise assertion problems. Very Nasty Mistake
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 10918294
In general a window doesn't exist until it is created.   For dialog/property sheet it is created as part of the DoModal or for modeless in the Create call.  Actually a property sheet doesn't even create the pages until they are actually required.
0
 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 10925035
Yeah, It was very Silly and Nasty Mistake I done

Although you have commented the right thing, Zoppo pointed the problem.


May I Split the points equally for both you guys :-)
 
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 10925748
Split if you think appropriate
0

Featured Post

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!

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

705 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