1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| #include "main.h"
myFrameMain::myFrameMain() : wxFrame(NULL, -1, "Titre", wxPoint(-1, -1), wxSize(1024,790), wxDEFAULT_FRAME_STYLE)
{
done=false;
this->Show(true);
while(!done)
{
Sleep(500);
}
}
void myFrameMain::onKey(wxKeyEvent &event)
{
wxLogMessage("onKey executé");
done=true;
}
BEGIN_EVENT_TABLE(myFrameMain, wxFrame)
EVT_KEY_DOWN(myFrameMain::onKey)
END_EVENT_TABLE()
IMPLEMENT_APP(Ini);
bool Ini::OnInit()
{
myFrameMain *frame = new myFrameMain();
frame->Show(TRUE);
return true;
} |