Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 1999-01-18
1
Medium Priority
?
783 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
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

972 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