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


C++ MyFrame::Show方法代码示例

本文整理汇总了C++中MyFrame::Show方法的典型用法代码示例。如果您正苦于以下问题:C++ MyFrame::Show方法的具体用法?C++ MyFrame::Show怎么用?C++ MyFrame::Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MyFrame的用法示例。


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

示例1: OnInit

// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
	wxInitAllImageHandlers();
	wxBitmap splashbitmap;
  	if (splashbitmap.LoadFile("/opt/extras.ubuntu.com/azpazeta/media/splash.png", wxBITMAP_TYPE_PNG))
  	{
      	wxSplashScreen* splash = new wxSplashScreen(splashbitmap,
          wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
          6000, NULL, -1, wxDefaultPosition, wxSize(400,400),
          wxSIMPLE_BORDER|wxSTAY_ON_TOP);
  	}
  	wxYield();
	//ChrTaskBarIcon* icon = new ChrTaskBarIcon(); 
    // call the base class initialization method, currently it only parses a
    // few common command-line options but it could be do more in the future
    if ( !wxApp::OnInit() )
        return false;
	SetAppName(wxT("Azpazeta"));
	SetVendorName(wxT("Adrian Arroyo Calle para Divel"));
        if(wxApp::argc>=2){
	fachada=1;
        wxString archivo=wxApp::argv[1].mb_str();
        //int* newsavedlg=new SaveDialog::Cargar(wxString archivo);
        SaveDialog* newsavedlg=new SaveDialog();
        newsavedlg->Cargar(archivo);
	newsavedlg->Destroy();
	MyFrame *frame = new MyFrame("Azpazeta");
	frame->Show(true);
	frame->Load();
	frame->Paint();
	//if(city==4){MyFrame::Stage4();}
	
        
        }else{	MyFrame *frame = new MyFrame("Azpazeta");
	frame->Show(true);
	frame->OnJugar();
	frame->Paint();}
        
        
    // create the main application window

    // and show it (the frames, unlike simple controls, are not shown when
    // created initially)
    
	
	

    // success: wxApp::OnRun() will be called which will enter the main message
    // loop and the application will run. If we returned false here, the
    // application would exit immediately.
    return true;
}
开发者ID:AdrianArroyoCalle,项目名称:azpazeta-original,代码行数:53,代码来源:inicio.cpp

示例2: OnInit

bool MyApp::OnInit(void)
{
    MyFrame *frame = new MyFrame(1, (wxFrame *) NULL, wxT("wxMultiCellSizer Sample"), wxPoint(50, 50), wxDefaultSize); //, wxSize(600, 500));

    frame->Show(true);

    SetTopWindow(frame);
    frame = new MyFrame(2, (wxFrame *) NULL, wxT("wxMultiCellCanvas Sample"), wxPoint(100, 100), wxSize(600, 500));

    frame->Show(true);

    SetTopWindow(frame);
    return true;
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:14,代码来源:mtest.cpp

示例3: OnInit

bool MyApp::OnInit()
{
	MyFrame *frame = new MyFrame(L"发票凑整", wxPoint(-1, -1), wxSize(-1, -1));
	frame->SetMinSize(wxSize(640, 480));
	frame->Show(true);
	return true;
}
开发者ID:sagaxu,项目名称:xcalc,代码行数:7,代码来源:main.cpp

示例4: OnInit

bool MyApp::OnInit()
{
	if ( !wxApp::OnInit() ) return false;
	MyFrame *frame = new MyFrame(_T("coLinux Console"));
	frame->Show(true);
	return true;
}
开发者ID:matt81093,项目名称:Original-Colinux,代码行数:7,代码来源:main.cpp

示例5: OnInit

// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
    if ( !wxApp::OnInit() )
        return false;

#if wxUSE_ACCESSIBILITY
    // Note: JAWS for Windows will only speak the context-sensitive
    // help if you use this help provider:
    // wxHelpProvider::Set(new wxHelpControllerHelpProvider(m_helpController)).
    // JAWS does not seem to be getting the help text from
    // the wxAccessible object.
    wxHelpProvider::Set(new wxSimpleHelpProvider());

    // create the main application window
    MyFrame *frame = new MyFrame(wxT("AccessTest wxWidgets App"),
                                 wxPoint(50, 50), wxSize(450, 340));

    // and show it (the frames, unlike simple controls, are not shown when
    // created initially)
    frame->Show(true);

    // success: wxApp::OnRun() will be called which will enter the main message
    // loop and the application will run. If we returned false here, the
    // application would exit immediately.
    return true;
#else
    wxMessageBox( wxT("This sample has to be compiled with wxUSE_ACCESSIBILITY"), wxT("Building error"), wxOK);
    return false;
#endif // wxUSE_ACCESSIBILITY
}
开发者ID:ruifig,项目名称:nutcracker,代码行数:31,代码来源:accesstest.cpp

示例6: OnInit

bool MyApp::OnInit()
{
    if ( !wxApp::OnInit() )
        return false;

#if wxUSE_LIBPNG
    wxImage::AddHandler(new wxPNGHandler);
#endif
#if wxUSE_LIBJPEG
    wxImage::AddHandler(new wxJPEGHandler);
#endif
#if wxUSE_GIF
    wxImage::AddHandler(new wxGIFHandler);
#endif

    MyFrame *frame = new MyFrame(_("Printing test"),
        wxDefaultPosition, wxSize(640, 480));

    // Show it
    frame->Show(true);

    // success: wxApp::OnRun() will be called which will enter the main message
    // loop and the application will run. If we returned false here, the
    // application would exit immediately.
    return true;
}
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:26,代码来源:printing.cpp

示例7: OnInit

bool MyApp::OnInit(void)
{
  // Create the main frame window
  MyFrame   *frame = new MyFrame(NULL, wxID_ANY, _T("wxWidgets Native Dialog Sample"), wxPoint(0, 0), wxSize(300, 250));

#if wxUSE_STATUSBAR
  // Give it a status line
  frame->CreateStatusBar(2);
#endif // wxUSE_STATUSBAR

  // Make a menubar
  wxMenu *file_menu = new wxMenu;

  file_menu->Append(RESOURCE_TEST1, _T("&Dialog box test"),                _T("Test dialog box resource"));
  file_menu->Append(RESOURCE_QUIT, _T("E&xit"),                _T("Quit program"));

  wxMenuBar *menu_bar = new wxMenuBar;

  menu_bar->Append(file_menu, _T("&File"));

  // Associate the menu bar with the frame
  frame->SetMenuBar(menu_bar);

  // Make a panel
  frame->panel = new wxWindow(frame, wxID_ANY, wxPoint(0, 0), wxSize(400, 400), 0, _T("MyMainFrame"));
  frame->Show(true);

  // Return the main frame window
  SetTopWindow(frame);

  return true;
}
开发者ID:EdgarTx,项目名称:wx,代码行数:32,代码来源:nativdlg.cpp

示例8: OnInit

bool MyApp::OnInit()
{
	MyFrame *frame = new MyFrame("Hello World", wxPoint(50, 50), wxSize(450, 340));
	frame->Show(true);

	return true;
}
开发者ID:cknolla,项目名称:wxWidgetSandbox,代码行数:7,代码来源:main.cpp

示例9: OnInit

// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit()
{
    // Create the main frame window
    MyFrame *frame = new MyFrame(NULL, wxT("wxWidgets OpenGL Penguin Sample"),
        wxDefaultPosition, wxDefaultSize);

    /* Make a menubar */
    wxMenu *fileMenu = new wxMenu;

    fileMenu->Append(wxID_EXIT, wxT("E&xit"));
    wxMenuBar *menuBar = new wxMenuBar;
    menuBar->Append(fileMenu, wxT("&File"));
    frame->SetMenuBar(menuBar);

    frame->SetCanvas( new TestGLCanvas(frame, wxID_ANY, wxDefaultPosition,
        wxSize(200, 200), wxSUNKEN_BORDER) );

    /* Load file wiht mesh data */
    frame->GetCanvas()->LoadLWO( wxT("penguin.lwo") );

    /* Show the frame */
    frame->Show(true);

    return true;
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:26,代码来源:penguin.cpp

示例10: OnInit

bool MyApp::OnInit()
{
    MyFrame *frame = new MyFrame( _T("Hello World"), wxPoint(50,50), wxSize(450,340) );
    frame->Show(TRUE);
    SetTopWindow(frame);
    return TRUE;
}
开发者ID:wjlroe,项目名称:experiments,代码行数:7,代码来源:wxwidgets.cpp

示例11: OnInit

 virtual bool OnInit(){
 	g_logger.config.stream_type = 3;
 	g_logger.reset();
     MyFrame *frame = new MyFrame(wxT("ZKS Sudoku Beta"), wxDefaultPosition, wxDefaultSize);
     frame->Show(true);
     return true;
 }
开发者ID:jimzshi,项目名称:game,代码行数:7,代码来源:main.cpp

示例12: OnInit

// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
    if ( !wxApp::OnInit() )
        return false;

#ifdef __WXMSW__
    if ( argc == 2 && !wxStricmp(argv[1],  wxT("/dx")) )
    {
        wxSystemOptions::SetOption(wxT("msw.display.directdraw"), 1);
    }
#endif // __WXMSW__

    // create the main application window
    MyFrame *frame = new MyFrame(_("Display wxWidgets Sample"),
                                 wxDefaultPosition, wxDefaultSize);

    // and show it (the frames, unlike simple controls, are not shown when
    // created initially)
    frame->Show();

    // success: wxApp::OnRun() will be called which will enter the main message
    // loop and the application will run. If we returned false here, the
    // application would exit immediately.
    return true;
}
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:26,代码来源:display.cpp

示例13: OnInit

bool MyApp::OnInit()
{
    char path1[100];
    char path2[100];

    // path to data
    sprintf_s(path1, 100, ".");
    if (argc > 1) {
        wxString s(argv[1]);
        strncpy_s( path1, 100, (const char*)s.mb_str(wxConvUTF8), 100 );
        std::cout << "OnInit: data path is " << path1 << std::endl;
    }

    // Specifying a file to load at the command line is optional
    // and is otherwise done through File->Load in the UI
    sprintf_s(path2, 100, "NO FILE");
    if (argc > 2) {
        wxString s(argv[2]);
        strncpy_s( path2, 100, (const char*)s.mb_str(wxConvUTF8), 100 );
        std::cout << "OnInit: default path is " << path2 << std::endl;
    }

    MyFrame *frame = new MyFrame( _T("Stick'em Up"), wxPoint(50,50), wxSize(640,480),
                                  std::string(path1), std::string(path2) );
    frame->Show(TRUE);
    SetTopWindow(frame);

    return TRUE;
} 
开发者ID:gfordyce,项目名称:stan,代码行数:29,代码来源:wx_app.cpp

示例14: OnInit

bool MyApp::OnInit()
{
#if wxUSE_LIBPNG
    wxImage::AddHandler( new wxPNGHandler );
#endif

    wxImage image;
    if (image.LoadFile(_T("backgrnd.png"), wxBITMAP_TYPE_PNG))
    {
        m_background = wxBitmap(image);
    }

    MyFrame *frame = new MyFrame();

    wxString rootName(_T("shape0"));

    int i;
    for (i = 1; i < 4; i++)
    {
        wxString filename;
        filename.Printf(wxT("%s%d.png"), (const wxChar*)rootName, i);
    /* For some reason under wxX11, the 2nd LoadFile in this loop fails, with
       a BadMatch inside CreateFromImage (inside ConvertToBitmap). This happens even if you copy
       the first file over the second file. */
        if (image.LoadFile(filename, wxBITMAP_TYPE_PNG))
        {
            DragShape* newShape = new DragShape(wxBitmap(image));
            newShape->SetPosition(wxPoint(i*50, i*50));

            if (i == 2)
                newShape->SetDragMethod(SHAPE_DRAG_TEXT);
            else if (i == 3)
                newShape->SetDragMethod(SHAPE_DRAG_ICON);
            else
                newShape->SetDragMethod(SHAPE_DRAG_BITMAP);
            frame->GetCanvas()->GetDisplayList().Append(newShape);
        }
    }

#if 0
    // Under Motif or GTK, this demonstrates that
    // wxScreenDC only gets the root window content.
    // We need to be able to copy the overall content
    // for full-screen dragging to work.
    int w, h;
    wxDisplaySize(& w, & h);
    wxBitmap bitmap(w, h);

    wxScreenDC dc;
    wxMemoryDC memDC;
    memDC.SelectObject(bitmap);
    memDC.Blit(0, 0, w, h, & dc, 0, 0);
    memDC.SelectObject(wxNullBitmap);
    m_background = bitmap;
#endif

    frame->Show( true );

    return true;
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:60,代码来源:dragimag.cpp

示例15: OnInit

bool MyApp::OnInit()
{
    MyFrame * frame = new MyFrame(wxT("APPLICATION"));
    frame->Show();

    return true;;
}
开发者ID:robinskumar73,项目名称:tarun_zimmerman-,代码行数:7,代码来源:Main.cpp


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