Solved

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

Posted on 1999-01-18
1
773 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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa‚Ķ
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

772 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

11 Experts available now in Live!

Get 1:1 Help Now