Solved

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

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
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.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

623 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