Solved

Dynamically add Item to CToolBar

Posted on 1997-09-11
3
413 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
[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 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

729 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