Solved

Add menu to CPropertySheet

Posted on 2006-10-25
5
595 Views
Last Modified: 2008-02-01
I have a CPropertySheet that has five pages (CPropertyPages).  I want to add a file menu (with "Open", "Save", "Save As", etc) to the property sheet.  I can't add the menu during design time because the "Menu" option in the resource editor is greyed out (for each property page's "Dialog Properties" page).  Besides, I'd want to add the menu to the property sheet, not the individual pages.  Any thoughts?  Thanks very much.
0
Comment
Question by:clintMon
[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
  • 2
5 Comments
 

Author Comment

by:clintMon
ID: 17803257
I'd wrote: " I can't add the menu during design time because the "Menu" option in the resource editor is greyed out".  I meant that I can't add the menu IN THE RESOURCE EDITOR during design time.
0
 
LVL 86

Expert Comment

by:jkr
ID: 17805498
>>I can't add the menu during design time because the "Menu" option in the resource editor is greyed out

That is grayed out because a Property Sheet technically is a dialog, and dialogs don't have menus (caution: don't confuse that with dialog based apps) according to the Windows GUI styleguides. And I might add that this idea also does not "feel" right to me. Why not implementing that as buttons, like it is usually done in these cases?
0
 

Author Comment

by:clintMon
ID: 17806243
OK.  I'm good with buttons instead of a menu (button for "Save", button for "Open File").  Is there a way to add the buttons to CPropertySheet?  This way, the buttons would be available on all of the Property Pages that my property sheet contains.
0
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 17806278
Actually, you can almost add anything you want, see e.g. http://www.codeproject.com/property/hacking_the_cpropertyshee.asp ("Hacking the CPropertySheet")
0
 

Author Comment

by:clintMon
ID: 17806350
Perfect, it's what I want, and much more actually.  I was thinking about using the apply button for one of my file features (open file or save file), and this article covers that.  Thanks.
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

Suggested Solutions

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

730 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