Solved

Customize Toolbar Dialog

Posted on 1998-08-20
3
416 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
ID: 1170821
Edited text of question
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1170822
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
ID: 1170823
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

863 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

25 Experts available now in Live!

Get 1:1 Help Now