Beispiel #1
0
MyFrame::MyFrame( wxWindow *parent, wxWindowID id, const wxString &title,
    const wxPoint &position, const wxSize& size, long style ) :
    wxFrame( parent, id, title, position, size, style )
{
    // Create menu and status bar.
    CreateMyMenuBar();
#if wxUSE_STATUSBAR
    CreateStatusBar(1);
    SetStatusText( _T("Welcome to wxEdit!") );
#endif // wxUSE_STATUSBAR

    // Create edit control. Since it is the only
    // control in the frame, it will be resized
    // to file it out.
    m_text = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );

    // Read .ini file for file history etc.
    wxConfig *conf = (wxConfig*) wxConfig::Get();

    int entries = 0;
    conf->Read( _T("/History/Count"), &entries );

    for (int i = 0; i < entries; i++)
    {
        wxString tmp;
        tmp.Printf( _T("/History/File%d"), (int)i );

        wxString res;
        conf->Read( tmp, &res );

        if (!res.empty())
            AddToHistory( res );
    }
}
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!") );
    
     // insert main window here
}
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
}