本文整理汇总了C++中TControlBar::Insert方法的典型用法代码示例。如果您正苦于以下问题:C++ TControlBar::Insert方法的具体用法?C++ TControlBar::Insert怎么用?C++ TControlBar::Insert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TControlBar
的用法示例。
在下文中一共展示了TControlBar::Insert方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetupSpeedBar
void mtlrchApp::SetupSpeedBar (TDecoratedMDIFrame *frame)
{
//
// Create default toolbar New and associate toolbar buttons with commands.
//
TControlBar* cb = new TControlBar(frame);
cb->Insert(*new TButtonGadget(CM_MDIFILENEW, CM_MDIFILENEW));
cb->Insert(*new TButtonGadget(CM_MDIFILEOPEN, CM_MDIFILEOPEN));
cb->Insert(*new TButtonGadget(CM_FILESAVE, CM_FILESAVE));
cb->Insert(*new TSeparatorGadget(6));
cb->Insert(*new TButtonGadget(CM_EDITCUT, CM_EDITCUT));
cb->Insert(*new TButtonGadget(CM_EDITCOPY, CM_EDITCOPY));
cb->Insert(*new TButtonGadget(CM_EDITPASTE, CM_EDITPASTE));
cb->Insert(*new TSeparatorGadget(6));
cb->Insert(*new TButtonGadget(CM_EDITUNDO, CM_EDITUNDO));
cb->Insert(*new TSeparatorGadget(6));
cb->Insert(*new TButtonGadget(CM_EDITFIND, CM_EDITFIND));
cb->Insert(*new TButtonGadget(CM_EDITFINDNEXT, CM_EDITFINDNEXT));
cb->Insert(*new TSeparatorGadget(6));
cb->Insert(*new TButtonGadget(CM_FILEPRINT, CM_FILEPRINT));
cb->Insert(*new TButtonGadget(CM_FILEPRINTPREVIEW, CM_FILEPRINTPREVIEW));
// Add fly-over help hints.
cb->SetHintMode(TGadgetWindow::EnterHints);
frame->Insert(*cb, TDecoratedFrame::Top);
}
示例2: InitMainWindow
void TMyApp::InitMainWindow()
{
int ResIdNum = ID_DLGMSG1000; // Hi Res Dialog
int h,w;
GetDefaultWH(w,h);
if(h <= 480)
{
ResIdNum = ID_DLGMSG640x480;
}
///
DlgMsg *Dw = new DlgMsg((TWindow*)0, ResIdNum);
MainFramePtr = new TDecoratedFrame(0, ".", Dw );
const int small = 6;
const big = 20;
TControlBar *Cbar = new TControlBar(MainFramePtr);
Cbar->Insert(*new TSeparatorGadget(big) ); // left margin on tool bar
Cbar->Insert(*new TButtonGadget(CM_BM_RESCAN,ID_RESCAN,TButtonGadget::Command) );
Cbar->Insert(*new TSeparatorGadget(big) );
Cbar->Insert(*new TButtonGadget(CM_BM_SETUP,ID_SETUP,TButtonGadget::Command) );
Cbar->Insert(*new TSeparatorGadget(small) );
Cbar->Insert(*new TButtonGadget(CM_BM_PROJECTWIN,CM_OPENPROJECTWIN,TButtonGadget::Command) );
Cbar->Insert(*new TSeparatorGadget(small) );
Cbar->Insert(*new TButtonGadget(CM_BM_PRJPATH,ID_PATH,TButtonGadget::Command) );
Cbar->Insert(*new TSeparatorGadget(big) );
Cbar->Insert(*new TButtonGadget(CM_BM_NEWCLASS,ID_ADD_CLASS,TButtonGadget::Command) );
Cbar->Insert(*new TSeparatorGadget(big) );
Cbar->Insert(*new TButtonGadget(CM_BM_VARIABLE,ID_VARIABLE,TButtonGadget::Command) );
Cbar->Insert(*new TSeparatorGadget(big) );
Cbar->Insert(*new TButtonGadget(CM_BM_ADDFUNCTION,ID_ADD_EVENT,TButtonGadget::Command) );
Cbar->Insert(*new TSeparatorGadget(small) );
Cbar->Insert(*new TButtonGadget(CM_BM_DELFUNCTION,ID_DEL_MEMBER,TButtonGadget::Command) );
Cbar->Insert(*new TSeparatorGadget(big) );
Cbar->Insert(*new TButtonGadget(CM_BM_TOOLS,ID_TOOLS,TButtonGadget::Command) );
Cbar->Insert(*new TSeparatorGadget(small) );
Cbar->Insert(*new TButtonGadget(CM_BM_ABOUT,CM_ABOUT,TButtonGadget::Command) );
MainFramePtr->Insert(*Cbar, TDecoratedFrame::Top);
Sbar = new TStatusBar(MainFramePtr,TGadget::Embossed, TStatusBar::CapsLock | TStatusBar::NumLock | TStatusBar::Overtype);
MainFramePtr->Insert(*Sbar, TDecoratedFrame::Bottom);
SetMainWindow( MainFramePtr );
MainWindow->AssignMenu(ID_MAINMENU);
MainWindow->SetIcon(this,ICON2);
MainWindow->Attr.Style &= ~WS_MAXIMIZEBOX;
RecallWindowSizePos();
RecallProjectPath(NULL,TRUE);
}