OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Using the Docking Classes
  1. Create a decorated frame. This can be a TDecoratedFrame, a TMDIDecoratedFrame-or any frame derived from TDecoratedFrame.
    TDecoratedMDIFrame* frame = new TDecoratedMDIFrame(Name, IDM_MAIN, *MdiClient, true);
  2. Create a harbor, passing the decorated frame to it:
    Harbor = new THarbor(*frame);
  3. Create a dockable control bar:
    TDockableControlBar* cb = new TDockableControlBar(frame);
  4. Set the caption and insert objects into the control bar:
    cb->SetCaption("Toolbar with Combobox");
    TComboBox* cBox = new TComboBox(0, 500, 0, 0, 180, 150, CBS_DROPDOWNLIST, 20);
    cb->Insert(*new TControlGadget(*cBox));
    cb->Insert(*new TSeparatorGadget);
    cb->Insert(*new TButtonGadget(CM_FONTBOLD, CM_FONTBOLD)
    cb->Insert(*new TButtonGadget(CM_FONTITALIC, CM_FONTITALIC));
  5. Insert the control bar into the harbor, specifing the location for the toolbar:
    Harbor->Insert(*cb, alTop);