Solved

Customize Toolbar Dialog

Posted on 1998-08-20
3
414 Views
Last Modified: 2012-05-04
I am trying to get the Customize Toolbar dialog available in MFC to work. I have done the following:

1. Added the CCS_ADJUSTABLE style.

int CMyToolBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
      if (CToolBar::OnCreate(lpCreateStruct) == -1)
            return -1;
      ModifyStyle(0, CCS_ADJUSTABLE);
            return 0;
}

2. I am trying to pop up the dialog by doing the following:

  m_wndToolBar.GetToolBarCtrl().Customize();

I see the dialog flashing, and then it disappears.

Can anyone tell me what I am missing? I know there is a lot more work I need to do to make the dialog functional. At this stage, I am only trying to display it.


Thanks!
0
Comment
Question by:sonal072198
3 Comments
 

Author Comment

by:sonal072198
Comment Utility
Edited text of question
0
 
LVL 7

Expert Comment

by:psdavis
Comment Utility
Before you get an answer, why don't you delete this and put it in the MFC section?
0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 50 total points
Comment Utility
No need to do that psdavis :-)

To support customization, your toolbar's parent window must handle the customization notification messages as described in CToolBarCtrl: Handling Customization Notifications.

For some full sample go to
http://www.codeguru.com
Click "Toolbar" on the left hand side
You will find several samples, 4 of which are specifically about toolbar customization

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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 pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

763 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now