Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Inserting a ComboBox in a ToolBar using Borland C++ 4.0

Posted on 1999-01-18
1
Medium Priority
?
782 Views
Last Modified: 2013-12-26
I am trying to insert a ComboBox control in a ToolBar using Borland C++ 4.0, without any success.
Here's what the code looks like:

// starting code
TDecoratedFrame *frame;
TControlBar *cb;
...
TComboBox *combo = new TComboBox(frame, ID_COMBO);
TControlGadget *cg = new TControlGadget(*combo);
cb->Insert( *cg );

This code does nothing, in other words the program works as it should except no ComboBox is shown anywhere.
Please help me, if you can!
0
Comment
Question by:pepa
[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
 
LVL 3

Accepted Solution

by:
JPM earned 200 total points
ID: 1299857
Supposed in InitMainWindow()

for instance :
......
 cb = new TControlBar( frame );
  frame->Insert(*cb, TDecoratedFrame::Top);

  // Create the combobox
  //
  combo = new TComboBox( 0 , ID_COMBO, 0, 0, 100, 100, CBS_DROPDOWN, 0);
     // or whatever you want

  TControlGadget* cg = new TControlGadget(*combo);
  cb->Insert(*combo);


That should do the job
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

705 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