The Frame Constructor
From WxWiki
See the online documentation
TextEditorApp.h - The TextEditorApp Definition
#ifndef TEXTEDITORAPP_H #define TEXTEDITORAPP_H class TextEditorApp : public wxApp { public: /** Initialize the application */ virtual bool OnInit(); }; DECLARE_APP(TextEditorApp) #endif // TEXTEDITORAPP_H
TextEditorApp.cpp - The TextEditorApp Implementation
// For compilers that don't support precompilation, include "wx/wx.h" #include "wx/wxprec.h" #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "TextEditorApp.h" #include "TextFrame.h" IMPLEMENT_APP(TextEditorApp) bool TextEditorApp::OnInit() { TextFrame *frame = new TextFrame( wxT("Simple Text Editor"), 100, 100, 400, 300); frame->Show(TRUE); SetTopWindow(frame); return true; }
Next: Adding A Control
