Solved

Tool Bar

Posted on 2000-04-16
3
184 Views
Last Modified: 2013-11-20
How to delete a button from tool bar after creation
0
Comment
Question by:TCNT
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
Zoppo earned 50 total points
ID: 2721949
Hi TCNT,

assuming your toolbar object is 'm_wndToolBar' and the button you want to delete has ID ID_BUTTON1 you can do:

CToolBarCtrl& toolBarCtrl = m_wndStatusBar.GetToolBarCtrl();
UINT id = toolBarCtrl.CommanToIndex( ID_BUTTON1 );
toolBarCtrl.DeleteButton( id ); // or you can use HideButton()

hope that helps,

ZOPPO
0
 

Author Comment

by:TCNT
ID: 2722133
This should be the correct line.
CToolBarCtrl& toolBarCtrl = m_wndToolBar.GetToolBarCtrl();
0
 
LVL 30

Expert Comment

by:Zoppo
ID: 2722139
uups, sorry and thanx for correction      :)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

13 Experts available now in Live!

Get 1:1 Help Now