Solved

Customize Toolbar Dialog

Posted on 1998-08-20
3
421 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

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…
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 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.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

829 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