Solved

How may i put a ComboBox on a ToolBar ?

Posted on 1997-01-06
1
265 Views
Last Modified: 2013-12-03
I need to know how to add a ComboBox on a ToolBar (TControlBar). In the documentation they say that i must use the TControlGadget class, but i can't manage this. I don't understand how to use this class...
Please : help me !
0
Comment
Question by:Alexander
[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
1 Comment
 

Accepted Solution

by:
msaraiva earned 50 total points
ID: 1298748
Let's say you have a TComboBox object and a TControlBar. All you need is to vreate a TControlGadget based on another control, in this case, TComboBox. This also works with the other controls (TEdit, ... )

/* code begins */

TControlBar* cbar = new TControlBar(frame);
/* frame is the frame window */

TComboBox *p_cb=new TComboBox( frame, RES_ID );
/* RES_ID is the identifier of the new control */

TControlGadget cg ( *p_cb );

cbar->Insert( cg );



0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 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