Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Tool Bar

Posted on 2000-04-16
3
Medium Priority
?
227 Views
Last Modified: 2013-11-20
How to delete a button from tool bar after creation
0
Comment
Question by:TCNT
[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
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 150 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 31

Expert Comment

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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

636 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