Solved

Dynamically add Item to CToolBar

Posted on 1997-09-11
3
399 Views
Last Modified: 2013-11-20
Hi , I have a question that Is it possible to Dynamically
add a new button to CtoolBar object. I can do it by subclass
the CToolBar class at initialization. But what I want to do
is Dynamically adding a truely new button(not know of it at initialization). Who know of it ?
0
Comment
Question by:lwei
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 50 total points
ID: 1306169
You can both add and delete buttons to the toolbar by accessing corresponding member functions of class CToolbarCtrl:
to add button AddButtons, to delete - DeleteButton, to insert button -  InsertButton. To obrain pointer to CToolbarCtrl you can call CToolbar's GetToolbarCtrl() function. You laso can use toolbar control messages instead of these functions
0
 
LVL 1

Author Comment

by:lwei
ID: 1306170
Yea , I know of it . But When I append a button , there is
some dot in the old toolbar ?

0
 
LVL 1

Author Comment

by:lwei
ID: 1306171
BTW , How to fresh the Toolbar after adding new button .
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

778 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