Solved

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

Posted on 1999-01-18
1
775 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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

914 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now