The Frame Constructor
Jump to navigation
Jump to search
See the online documentation
#ifndef TEXTEDITORAPP_H
#define TEXTEDITORAPP_H
class TextEditorApp : public wxApp
{
public:
/** Initialize the application */
virtual bool OnInit();
};
DECLARE_APP(TextEditorApp)
#endif // TEXTEDITORAPP_H
// 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