the problem of resize event
Posted: Mon Feb 13, 2006 4:20 pm
I wrote a very simple program.one frame,one menu,one button
but the sentence SetMenuBar( menuBar ) cannot exist with the
EVT_SIZE(MyFrame::OnSize)
void MyFrame::OnSize(wxSizeEvent& event)
{
if(myButton)
{
wxSize size = GetClientSize();
myButton->SetSize(0,0,size.x,size.y);
}
event.Skip();
}
why?
when I run the application,it show a memory err.
but the sentence SetMenuBar( menuBar ) cannot exist with the
EVT_SIZE(MyFrame::OnSize)
void MyFrame::OnSize(wxSizeEvent& event)
{
if(myButton)
{
wxSize size = GetClientSize();
myButton->SetSize(0,0,size.x,size.y);
}
event.Skip();
}
why?
when I run the application,it show a memory err.