Code: Select all
wxButton* button = new wxButton(this, ID_OK, _T("OK"), wxPoint(50,50), wxSize(80,20));//新增一个按钮button
void MyFrame::OnButtonOK(wxCommandEvent& event)
{
wxMessageBox(_T("You press me"),_T("Button"), wxOK | wxICON_INFORMATION, this);
button->SetText("Test");//前面的正常,加上这句为什么编译不过?
}