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


C++ CreateStatusBar函数代码示例

本文整理汇总了C++中CreateStatusBar函数的典型用法代码示例。如果您正苦于以下问题:C++ CreateStatusBar函数的具体用法?C++ CreateStatusBar怎么用?C++ CreateStatusBar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了CreateStatusBar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: wxFrame

FindPath::FindPath( wxWindow *parent, wxWindowID id, const wxString &title,
    const wxPoint &position, const wxSize& size, long style ) :
    wxFrame( parent, id, title, position, size, style )
{
    CreateMyMenuBar();
    
    CreateMyToolBar();
    
    CreateStatusBar(1);
    SetStatusText( wxT("Welcome!") );
    
     // insert main window here
}
开发者ID:brock7,项目名称:TianLong,代码行数:13,代码来源:FindPath.cpp

示例2: wxFrame

MyFrame::MyFrame(const wxString & title) : wxFrame(NULL, wxID_ANY, title) {
	wxMenu * fileMenu = new wxMenu;
	wxMenu * helpMenu = new wxMenu;
	helpMenu->Append(wxID_ABOUT, wxT("About"), wxT("About dialog"));
	fileMenu->Append(wxID_EXIT, wxT("Exit"), wxT("Quit this program"));
	wxMenuBar *menuBar = new wxMenuBar();
	menuBar->Append(fileMenu,wxT("File"));
	menuBar->Append(helpMenu,wxT("Help"));
	SetMenuBar(menuBar);

	CreateStatusBar(2);
	SetStatusText(wxT("Welcome to PTA Tool"));
}
开发者ID:fern17,项目名称:PTA-Tool,代码行数:13,代码来源:Visual.cpp

示例3: wxFrame

MyFrame::MyFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(500,300))
{
    m_simplePopup = m_scrolledPopup = NULL;

    SetIcon(wxICON(sample));

#if wxUSE_MENUS
    wxMenu *menuFile = new wxMenu;

    // the "About" item should be in the help menu
    wxMenu *helpMenu = new wxMenu;
    helpMenu->Append(Minimal_About, wxT("&About\tF1"), wxT("Show about dialog"));

    menuFile->Append(Minimal_TestDialog, wxT("&Test dialog\tAlt-T"), wxT("Test dialog"));
    menuFile->Append(Minimal_Quit, wxT("E&xit\tAlt-X"), wxT("Quit this program"));

    // now append the freshly created menu to the menu bar...
    wxMenuBar *menuBar = new wxMenuBar();
    menuBar->Append(menuFile, wxT("&File"));
    menuBar->Append(helpMenu, wxT("&Help"));

    // ... and attach this menu bar to the frame
    SetMenuBar(menuBar);
#endif // wxUSE_MENUS

#if wxUSE_STATUSBAR
    // create a status bar just for fun (by default with 1 pane only)
    CreateStatusBar(2);
    SetStatusText(wxT("Welcome to wxWidgets!"));
#endif // wxUSE_STATUSBAR

    wxPanel *panel = new wxPanel(this, -1);
    wxButton *button1 = new wxButton( panel, Minimal_StartSimplePopup, wxT("Show simple popup"), wxPoint(20,20) );
    wxButton *button2 = new wxButton( panel, Minimal_StartScrolledPopup, wxT("Show scrolled popup"), wxPoint(20,70) );

    m_logWin = new wxTextCtrl( panel, wxID_ANY, wxEmptyString, wxDefaultPosition,
                               wxDefaultSize, wxTE_MULTILINE );
    m_logWin->SetEditable(false);
    wxLogTextCtrl* logger = new wxLogTextCtrl( m_logWin );
    m_logOld = logger->SetActiveTarget( logger );
    logger->DisableTimestamp();

    wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL );
    topSizer->Add( button1, 0, wxALL, 5 );
    topSizer->Add( button2, 0, wxALL, 5 );
    topSizer->Add( m_logWin, 1, wxEXPAND|wxALL, 5 );

    panel->SetSizer( topSizer );

}
开发者ID:ruifig,项目名称:nutcracker,代码行数:51,代码来源:popup.cpp

示例4: CreateStatusBar

bool wxGISApplication::CreateApp(void)
{
	CreateStatusBar();
	wxFrame::GetStatusBar()->SetStatusText(_("Ready"));

    if(!wxGISApplicationBase::CreateApp())
        return false;
    //load commandbars
	SerializeCommandBars();

	//load accelerators
    m_pGISAcceleratorTable = new wxGISAcceleratorTable(this);


    wxGISAppConfig oConfig = GetConfig();
	if(!oConfig.IsOk())
		return false;
    // create MenuBar
	wxXmlNode* pMenuBarNode = oConfig.GetConfigNode(enumGISHKCU, GetAppName() + wxString(wxT("/frame/menubar")));

    m_pMenuBar = new wxGISMenuBar(wxMB_DOCKABLE, this, pMenuBarNode); //wxMB_DOCKABLE
    SetMenuBar(static_cast<wxMenuBar*>(m_pMenuBar));

	//mark menues from menu bar as enumGISTAMMenubar
	for(size_t i = 0; i < m_CommandBarArray.GetCount(); ++i)
		if(m_pMenuBar->IsMenuBarMenu(m_CommandBarArray[i]->GetName()))
			m_CommandBarArray[i]->SetType(enumGISCBMenubar);

    // min size for the frame itself isn't completely done.
    // see the end up wxAuiManager::Update() for the test
    // code. For now, just hard code a frame minimum size
    SetMinSize(wxSize(800,480));

	SerializeFramePos(false);
	SetAcceleratorTable(m_pGISAcceleratorTable->GetAcceleratorTable());
    SetApplication( this );

//    wxHtmlWindow *pHtmlText = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_DEFAULT_STYLE | wxBORDER_THEME);
//    pHtmlText->SetPage(wxT("<html><body><h1>Error</h1>Some error occurred :-H)</body></hmtl>"));
//    pHtmlText->Show(false);
//    RegisterChildWindow(pHtmlText->GetId());
//
//#ifdef __WXGTK__
// //   wxGISToolBarMenu* pToolBarMenu =  dynamic_cast<wxGISToolBarMenu*>(GetCommandBar(TOOLBARMENUNAME));
//	//if(pToolBarMenu)
//	//    PushEventHandler(pToolBarMenu);
////	m_pMenuBar->PushEventHandler(this);
//#endif
    return true;
}
开发者ID:Mileslee,项目名称:wxgis,代码行数:50,代码来源:application.cpp

示例5: END_EVENT_TABLE

END_EVENT_TABLE() EDA_3D_FRAME::EDA_3D_FRAME( PCB_BASE_FRAME*   parent,
                                              const wxString&   title,
                                              long              style ) :
    EDA_BASE_FRAME( parent, DISPLAY3D_FRAME_TYPE, title,
                    wxDefaultPosition, wxDefaultSize, style, wxT( "Frame3D" ) )
{
    m_canvas        = NULL;
    m_reloadRequest = false;
    m_ortho         = false;

    // Give it an icon
    wxIcon icon;
    icon.CopyFromBitmap( KiBitmap( icon_3d_xpm ) );
    SetIcon( icon );

    GetSettings();
    SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );

    // Create the status line
    static const int dims[5] = { -1, 100, 100, 100, 140 };

    CreateStatusBar( 5 );
    SetStatusWidths( 5, dims );

    CreateMenuBar();
    ReCreateMainToolbar();

    // Make a EDA_3D_CANVAS
    int attrs[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0 };
    m_canvas = new EDA_3D_CANVAS( this, attrs );

    m_auimgr.SetManagedWindow( this );


    EDA_PANEINFO horiztb;
    horiztb.HorizontalToolbarPane();

    m_auimgr.AddPane( m_mainToolBar,
                      wxAuiPaneInfo( horiztb ).Name( wxT( "m_mainToolBar" ) ).Top() );

    m_auimgr.AddPane( m_canvas,
                      wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() );

    m_auimgr.Update();

    // Fixes bug in Windows (XP and possibly others) where the canvas requires the focus
    // in order to receive mouse events.  Otherwise, the user has to click somewhere on
    // the canvas before it will respond to mouse wheel events.
    m_canvas->SetFocus();
}
开发者ID:jerkey,项目名称:kicad,代码行数:50,代码来源:3d_frame.cpp

示例6: wxFrame

// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
        : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
{
    SetIcon(wxICON(sample));

    // create a menu bar
    wxMenu *menuFile = new wxMenu;
    menuFile->Append(Minimal_Open, _("Open...\tCtrl-O"));
    menuFile->AppendSeparator();
    menuFile->Append(Minimal_PageSetup, _("Page &Setup"));
    menuFile->Append(Minimal_Preview, _("Print pre&view..."));
    menuFile->Append(Minimal_Print, _("Print...\tCtrl-P"));
    menuFile->AppendSeparator();
    menuFile->Append(wxID_ABOUT, _("&About"));
    menuFile->AppendSeparator();
    menuFile->Append(Minimal_Quit, _("&Exit"));

    wxMenu *menuFonts = new wxMenu;
    menuFonts->AppendRadioItem(Minimal_PrintSmall, _("&Small Printer Fonts"));
    menuFonts->AppendRadioItem(Minimal_PrintNormal, _("&Normal Printer Fonts"));
    menuFonts->AppendRadioItem(Minimal_PrintHuge, _("&Huge Printer Fonts"));

    // now append the freshly created menu to the menu bar...
    wxMenuBar *menuBar = new wxMenuBar;
    menuBar->Append(menuFile, _("&File"));
    menuBar->Append(menuFonts, _("F&onts"));

    // ... and attach this menu bar to the frame
    SetMenuBar(menuBar);

#if wxUSE_STATUSBAR
    CreateStatusBar(1);
#endif // wxUSE_STATUSBAR

    m_Html = new wxHtmlWindow(this);
    m_Html -> SetRelatedFrame(this, _("HTML : %s"));
#if wxUSE_STATUSBAR
    m_Html -> SetRelatedStatusBar(0);
#endif // wxUSE_STATUSBAR
    m_Name = wxT("test.htm");
    m_Html -> LoadPage(m_Name);

    m_Prn = new wxHtmlEasyPrinting(_("Easy Printing Demo"), this);
    m_Prn -> SetHeader(m_Name + wxT("(@[email protected]/@[email protected])<hr>"), wxPAGE_ALL);

    // To specify where the AFM files are kept on Unix,
    // you may wish to do something like this
    // m_Prn->GetPrintData()->SetFontMetricPath(wxT("/home/julians/afm"));
}
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:50,代码来源:printing.cpp

示例7: wxFrame

CFrameWnd::CFrameWnd( const wxString& x_sTitle, const wxPoint& x_ptWin, const wxSize& x_sizeWin )
	: wxFrame( (wxFrame*)NULL, -1, x_sTitle, x_ptWin, x_sizeWin,
				wxFULL_REPAINT_ON_RESIZE | wxDEFAULT_FRAME_STYLE )
{_STT();
	m_pTimer = NULL;

//	SetIcon( wxIcon( mondrian_xpm ) );

	wxImage::AddHandler( new wxJPEGHandler );

	wxMenu *pcMenuFile = new wxMenu;
	if ( pcMenuFile )
		pcMenuFile->Append( WXIDM_Open, _T( "&Open" ) ),
		pcMenuFile->AppendSeparator(),
		pcMenuFile->Append( WXIDM_Exit, _T( "E&xit" ) );

	wxMenuBar *pcMenuBar = new wxMenuBar;
	if ( pcMenuBar )
		pcMenuBar->Append( pcMenuFile, _T( "&File" ) ),
		SetMenuBar( pcMenuBar );

	CreateStatusBar();

//	SetStatusText( _T( "This is a status text" ) );

	// Open the capture device
	if ( !m_cCapture.Open( oexVIDSUB_AUTO, 0, 0, 320, 240, 0, 15, oex::oexTRUE ) )
//	if ( !m_cCapture.Open( oexVIDSUB_DSHOW, 0, 0, 320, 240, 24, 15, oex::oexTRUE ) )
//	if ( !m_cCapture.Open( oexVIDSUB_VFW, 0, 0, 320, 240, 24, 15, oex::oexTRUE ) )
		SetStatusText( _T( "Failed to open catpure device" ) );

	else
		SetStatusText( oexLocalTimeStr( oexT( "%W, %B %D, %Y - %h:%m:%s %A" ) ).Ptr() );

	if ( m_cCapture.IsOpen() )
	{	//m_cCapture.WaitForFrame();
		m_cCapture.StartCapture();

		// +++ Just a hack till we get the callbacks going
		m_pTimer = new wxTimer( this );
		m_pTimer->Start( 1000 / 15 );

	} // end if


//	wxMessageBox( oex::os::CTrace::GetBacktrace().Ptr(), _T( "Stack Trace" ), wxOK, this );

//	SetStatusText( m_v4lCap.GetLastErrorStr().Ptr() );
}
开发者ID:MangoCats,项目名称:winglib,代码行数:49,代码来源:frame_wnd.cpp

示例8: wxFrame

MyFrame::MyFrame()
    : wxFrame( (wxFrame *)NULL, wxID_ANY, wxT("wxImage sample"),
                wxPoint(20, 20), wxSize(950, 700) )
{
    SetIcon(wxICON(sample));

    wxMenuBar *menu_bar = new wxMenuBar();

    wxMenu *menuImage = new wxMenu;
    menuImage->Append( ID_NEW, wxT("&Show any image...\tCtrl-O"));
    menuImage->Append( ID_INFO, wxT("Show image &information...\tCtrl-I"));
#ifdef wxHAVE_RAW_BITMAP
    menuImage->AppendSeparator();
    menuImage->Append( ID_SHOWRAW, wxT("Test &raw bitmap...\tCtrl-R"));
#endif
#if wxUSE_GRAPHICS_CONTEXT
    menuImage->AppendSeparator();
    menuImage->Append(ID_GRAPHICS, "Test &graphics context...\tCtrl-G");
#endif // wxUSE_GRAPHICS_CONTEXT
    menuImage->AppendSeparator();
    menuImage->Append( ID_SHOWTHUMBNAIL, wxT("Test &thumbnail...\tCtrl-T"),
                        "Test scaling the image during load (try with JPEG)");
    menuImage->AppendSeparator();
    menuImage->Append( ID_ABOUT, wxT("&About\tF1"));
    menuImage->AppendSeparator();
    menuImage->Append( ID_QUIT, wxT("E&xit\tCtrl-Q"));
    menu_bar->Append(menuImage, wxT("&Image"));

#if wxUSE_CLIPBOARD
    wxMenu *menuClipboard = new wxMenu;
    menuClipboard->Append(wxID_COPY, wxT("&Copy test image\tCtrl-C"));
    menuClipboard->Append(wxID_PASTE, wxT("&Paste image\tCtrl-V"));
    menu_bar->Append(menuClipboard, wxT("&Clipboard"));
#endif // wxUSE_CLIPBOARD

    SetMenuBar( menu_bar );

#if wxUSE_STATUSBAR
    CreateStatusBar(2);
    int widths[] = { -1, 100 };
    SetStatusWidths( 2, widths );
#endif // wxUSE_STATUSBAR

    m_canvas = new MyCanvas( this, wxID_ANY, wxPoint(0,0), wxSize(10,10) );

    // 500 width * 2750 height
    m_canvas->SetScrollbars( 10, 10, 50, 275 );
    m_canvas->SetCursor(wxImage("cursor.png"));
}
开发者ID:ruifig,项目名称:nutcracker,代码行数:49,代码来源:image.cpp

示例9: wxFrame

WConfig::WConfig(WMain* main, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxFrame(NULL, wxID_ANY, title, pos, size, style)
{
    //this->SetSize(size);
    wxPanel *panel = new wxPanel(this, wxID_ANY);

    T_nElectrode = new wxStaticText(panel, ID_TxtnElectrode, _T("Número de Eletrodos"), wxPoint(10,10), wxSize(220, 28));
    T_tCycle = new wxStaticText(panel, ID_TxttCycle, _T("Tempo de Ciclo (us)"), wxPoint(10,40), wxSize(220, 28));
    T_Pattern = new wxStaticText(panel, ID_TxtPattern, _T("Padrão (Pula)"), wxPoint(10,70), wxSize(220, 28));
    T_nMeasure = new wxStaticText(panel, ID_TxtnMeasure, _T("Número de Medidas"), wxPoint(10,100), wxSize(220, 28));
    T_tTimeout = new wxStaticText(panel, ID_TxttTimeout, _T("Tempo de Timeout (us)"), wxPoint(10,130), wxSize(220, 28));
    T_fSample = new wxStaticText(panel, ID_TxtfSample, _T("Frequência de Amostragem (kHz)"), wxPoint(10,160), wxSize(220, 28));
    T_nUnstable = new wxStaticText(panel, ID_TxtnUnstable, _T("Medidas para Estabilização"), wxPoint(10,190), wxSize(220, 28));
    T_fExcitation = new wxStaticText(panel, ID_TxtfExcitation, _T("Frequência de Excitação (kHz)"), wxPoint(10,220), wxSize(220, 28));

    P_nElectrode = new wxTextCtrl(panel, ID_CfgnElectrode, _T("???"), wxPoint(240,5), wxSize(80,28), wxTE_PROCESS_ENTER);
    P_tCycle = new wxTextCtrl(panel, ID_CfgtCycle, _T("???"), wxPoint(240,35), wxSize(80,28), wxTE_PROCESS_ENTER);
    P_Pattern = new wxTextCtrl(panel, ID_CfgPattern, _T("???"), wxPoint(240,65), wxSize(80,28), wxTE_PROCESS_ENTER);
    P_nMeasure = new wxTextCtrl(panel, ID_CfgnMeasure, _T("???"), wxPoint(240,95), wxSize(80,28), wxTE_PROCESS_ENTER);
    P_tTimeout = new wxTextCtrl(panel, ID_CfgtTimeout, _T("???"), wxPoint(240,125), wxSize(80,28), wxTE_PROCESS_ENTER);
    P_fSample = new wxTextCtrl(panel, ID_CfgfSample, _T("???"), wxPoint(240,155), wxSize(80,28), wxTE_PROCESS_ENTER);
    P_nUnstable = new wxTextCtrl(panel, ID_CfgnUnstable, _T("???"), wxPoint(240,185), wxSize(80,28), wxTE_PROCESS_ENTER);
    P_fExcitation = new wxTextCtrl(panel, ID_CfgfExcitation, _T("???"), wxPoint(240,215), wxSize(80,28), wxTE_PROCESS_ENTER);


    btnUpdate = new wxButton(panel, ID_Update, "OK", wxPoint(160,250), wxSize(70,28));
    btnCancel = new wxButton(panel, ID_Cancel, "Cancelar", wxPoint(240,250), wxSize(70,28));
    btnUpdate->Disable();

    //update = new wxTimer(this, ID_CfgTimer);
    //update->Start(1000);


    //opProtocol = new wxChoice(panel, ID_ChkBoxProto, wxPoint(100,61), wxSize(330,28));
    //opProtocol->Append("BasicBus V.01");
    //opProtocol->Append("Sniffer");
    //opProtocol->SetSelection(0);

    //opMode = new wxChoice(panel, ID_ChkBoxMode, wxPoint(100,1), wxSize(100,28), 2, commModes);
    //opMode->SetSelection(1);
	CreateStatusBar();
	SetStatusText("Atualizando Dados...");

	//SetSize(520,380);
    //run = (Scan*)main->run;
    //FileData = main->FileData;
	//run->Send(5);

}
开发者ID:aorbe,项目名称:eit,代码行数:49,代码来源:WConfig.cpp

示例10: wxT

MyFrame::MyFrame(wxWindow* parent, const wxString& title)
:wxFrame(parent,wxID_ANY, title)
{
	//SetIcon(wxIcon(mondrian_xpm));
	wxMenu* fileMenu = new wxMenu;
	wxMenu* helpMenu = new wxMenu;
	helpMenu->Append(wxID_ABOUT, wxT("&About...\tF1"), wxT("Show about dialog"));
	fileMenu->Append(wxID_EXIT, wxT("E&xit\tAlt-X"), wxT("Quit this program"));
	wxMenuBar* menuBar = new wxMenuBar();
	menuBar->Append(fileMenu, wxT("&File"));
	menuBar->Append(helpMenu, wxT("&Help"));
	SetMenuBar(menuBar);
	CreateStatusBar(2);
	SetStatusText(wxT("Welcome to WxWidgets!"));
}
开发者ID:ani19tha,项目名称:dynamica,代码行数:15,代码来源:MyFrame.cpp

示例11: wxFrame

MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame(NULL, wxID_ANY, title, pos, size) {
  wxMenu *menuFile = new wxMenu;
  menuFile->Append(ID_Hello, wxT("&Hello...\tCtrl-H"), wxT("Help string shown in status bar for this menu item"));
  menuFile->AppendSeparator();
  menuFile->Append(wxID_EXIT);
  wxMenu *menuHelp = new wxMenu;
  menuHelp->Append(wxID_ABOUT);
  wxMenuBar *menuBar = new wxMenuBar;
  menuBar->Append( menuFile, wxT("&File") );
  menuBar->Append( menuHelp, wxT("&Help") );
  SetMenuBar( menuBar );
  CreateStatusBar();
  SetStatusText(wxT("Welcome to wxWidgets!"));
}
开发者ID:limhyon,项目名称:wxstartapp,代码行数:15,代码来源:main.cpp

示例12: wxFrame

MyFrame::MyFrame( wxWindow *parent, wxWindowID id, const wxString &title,
    const wxPoint &position, const wxSize& size, long style ) :
    wxFrame( parent, id, title, position, size, style )
{
    CreateMyMenuBar();
    
    CreateStatusBar(1);
    SetStatusText( wxT("Welcome to minimal!") );

#ifndef __WXMAC__    
    SetIcon(wxICON(mondrian));
#endif

     // insert main window here
}
开发者ID:Dovedanhan,项目名称:wxPython-In-Action,代码行数:15,代码来源:minimal.cpp

示例13: wxFrame

NaviMainFrame::NaviMainFrame() :
        wxFrame((wxFrame*) NULL, wxID_ANY, wxT("Navi")),
        m_noteBook(NULL),
        m_taskBarIcon(NULL) {
    // create our menu here 
    initMenu();

    // navigation up top (play pause buttons)
    wxPanel* panelMain = new wxPanel(this);
    wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
    panelMain->SetSizer(sizer);

    m_navigation = new NavigationContainer(panelMain, this);

    // bottom part:
    wxPanel* p = createBottom(panelMain);

    // Add the components to the sizer. Add a border of 5 px so the widgets aren't
    // 'attached' to the edges of the wxFrame itself (looks neater).
    // add navigation to the sizer
    sizer->Add(m_navigation, wxSizerFlags().Expand().Border(wxALL, 5));
    // add the bottom pieces to the sizer. Note that we user a proportion of 1 here to max
    // it out all the way to the bottom.
    sizer->Add(p, wxSizerFlags(1).Expand().Border(wxALL, 5));
    
    CreateStatusBar();

    // create the track status handler event handling stuff. This thing
    // is created on the heap, without a parent wxWindow. this pointer is
    // given still though, but by destroying this frame, the trackstatushandler
    // instance will not be destroyed automatically. Not that it matters,
    // since after we destroyed this frame, the program should end anyway.
    m_trackStatusHandler = new TrackStatusHandler(this);
    // Push that event handler, otherwise events will not be propagated to
    // this new track status handler.
    PushEventHandler(m_trackStatusHandler);

    // create a systray icon.
    bool trayEnabled;
    wxConfigBase::Get()->Read(Preferences::MINIMIZE_TO_TRAY, &trayEnabled, false);
    if (trayEnabled) {
        m_taskBarIcon = new SystrayIcon(this);
        wxBitmap bm(wxT("./data/icons/navi.png"), wxBITMAP_TYPE_PNG);
        wxIcon icon;
        icon.CopyFromBitmap(bm);
        m_taskBarIcon->SetIcon(icon, wxT("Navi - Hey, listen!"));
    }
}
开发者ID:krpors,项目名称:navi,代码行数:48,代码来源:main.cpp

示例14: InitMainWnd

static BOOL
InitMainWnd(PMAIN_WND_INFO Info)
{
    HANDLE DevEnumThread;
    HMENU hMenu;

    if (!pCreateToolbar(Info))
        DisplayString(_T("error creating toolbar"));

    if (!CreateTreeView(Info))
    {
        DisplayString(_T("error creating list view"));
        return FALSE;
    }

    if (!CreateStatusBar(Info))
        DisplayString(_T("error creating status bar"));

    UpdateViewMenu(Info);

    /* make 'properties' bold */
    hMenu = GetMenu(Info->hMainWnd);
    hMenu = GetSubMenu(hMenu, 1);
    SetMenuDefaultItem(hMenu, IDC_PROP, FALSE);

    /* Create Popup Menu */
    Info->hShortcutMenu = LoadMenu(hInstance,
                                   MAKEINTRESOURCE(IDR_POPUP));
    Info->hShortcutMenu = GetSubMenu(Info->hShortcutMenu,
                                     0);
    SetMenuDefaultItem(Info->hShortcutMenu, IDC_PROP, FALSE);

    /* create seperate thread to emum devices */
    DevEnumThread = CreateThread(NULL,
                                 0,
                                 DeviceEnumThread,
                                 Info,
                                 0,
                                 NULL);
    if (!DevEnumThread)
    {
        DisplayString(_T("Failed to enumerate devices"));
        return FALSE;
    }

    CloseHandle(DevEnumThread);
    return TRUE;
}
开发者ID:RareHare,项目名称:reactos,代码行数:48,代码来源:mainwnd.c

示例15: Menu

//Construtor da Frame
MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size) 
                :wxFrame(NULL, wxID_ANY, title, pos, size){
    
    //Criação do Menu
    Menu *MenuBar = new Menu();
    SetMenuBar(MenuBar);
    Centre();
      
    //Setando o ícone
    SetIcon(wxIcon(wxString(_T("/../Images/Icones/icone"), wxBITMAP_TYPE_BMP)));
    
    //Criando barra de ferramentas
    m_toolbar = CreateToolBar(wxTB_FLAT | wxTB_HORIZONTAL | wxTB_TEXT,wxID_ANY);   
    
    m_toolbar->AddTool(ID_NEW, wxString(_("Novo")), wxBitmap(wxT("../../Images/Icones/newfile.bmp"), wxBITMAP_TYPE_BMP), wxString(_("Novo")));
    m_toolbar->AddTool(ID_SAVE, wxString(_("Salvar")), wxBitmap(wxT("../../Images/Icones/save.bmp"), wxBITMAP_TYPE_BMP), wxString(_("Salvar")));
    m_toolbar->AddTool(ID_OPEN, wxString(_("Abrir")), wxBitmap(wxT("../../Images/Icones/open.bmp"), wxBITMAP_TYPE_BMP), wxString(_("Abrir")));
    
    m_toolbar->AddSeparator();
    
    m_toolbar->AddTool(ID_HELP, wxString(_("Ajuda")), wxBitmap(wxT("../../Images/Icones/help.bmp"), wxBITMAP_TYPE_BMP), wxString(_("Ajuda")));
    m_toolbar->AddTool(wxID_EXIT, wxString(_("Sair")), wxBitmap(wxT("../../Images/Icones/close.bmp"), wxBITMAP_TYPE_BMP), wxString(_("Sair")));

    //Para atualizar a barra de ferramentas com os ícones bitmap
    m_toolbar->Realize();
    
    //Setanto barra de ferramentas
    SetToolBar(m_toolbar);

    //Barra de Status
    CreateStatusBar(3);
    SetStatusText("TP2 PAC", 0);
    
    // connectando eventos de menu da frame aos "handlers" da classe menu
    Connect(ID_NEW, wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler(Menu::OnNew));
    Connect(ID_OPEN, wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler(Menu::OnOpen));
    Connect(ID_SAVE, wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler(Menu::OnSave));   
    Connect(ID_HELP, wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler(Menu::OnHelp));
    Connect(ID_PORTUGUESE, wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler(Menu::OnPortuguese));       
    Connect(ID_ENGLISH, wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler(Menu::OnEnglish));
    Connect(ID_SPANISH, wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler(Menu::OnSpanish));   
    Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler(Menu::OnExit));   
    Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler(Menu::OnAbout));
    
    

};
开发者ID:TarcisioBatista,项目名称:TP2,代码行数:48,代码来源:MainFrame.cpp


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