Solved

Removing Cancel Button from CPropertySheet

Posted on 2004-04-25
12
366 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
  • 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 25 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 31

Assisted Solution

by:Zoppo
Zoppo earned 25 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CRON statement to run every 3 minutes except on Monday morning 12am to 2am 7 101
viewing source code from eclipse 13 110
mapBully challenge 6 152
wordappend challenge 8 199
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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.

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