当前位置: 首页>>代码示例>>C++>>正文


C++ TControlBar::Insert方法代码示例

本文整理汇总了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);
}
开发者ID:ahoffman747,项目名称:tak-lab,代码行数:27,代码来源:MTLRCHAP.CPP

示例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);
}
开发者ID:OS2World,项目名称:DEV-CPLUSPLUS-UTIL-Professor_Owl,代码行数:49,代码来源:main.cpp


注:本文中的TControlBar::Insert方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。