Hi, when i click the button, but, still no respond... could somebody help me? Thanks...
class frmLogin: public wxMDIChildFrame { public:
frmLogin(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style); ~frmLogin(); private: void Login(wxCommandEvent &event); DECLARE_EVENT_TABLE() };
wxList appLogin_children; enum{ frmLogin_Login=1000 };
frmLogin::frmLogin(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style) : wxMDIChildFrame(parent, -1, title, pos, size, style | wxNO_FULL_REPAINT_ON_RESIZE){ appLogin_children.Append(this); SetSizeHints(100, 100); wxBoxSizer *dialogSizer = new wxBoxSizer(wxVERTICAL);
wxFlexGridSizer *controlSizer = new wxFlexGridSizer(2, 2, 10, 10);
controlSizer->Add(new wxStaticText(this, -1, "Username : "), 0, wxALIGN_CENTRE_VERTICAL); controlSizer->Add(new wxTextCtrl(this, -1), 0, wxALIGN_CENTRE_VERTICAL); controlSizer->Add(new wxStaticText(this, -1, "Password : "), 0, wxALIGN_CENTRE_VERTICAL); controlSizer->Add(new wxTextCtrl(this, -1), 0, wxALIGN_CENTRE_VERTICAL);
wxBoxSizer *buttonSizer = new wxBoxSizer(wxVERTICAL); buttonSizer->Add(new wxButton(this, frmLogin_Login, "&Login"));
dialogSizer->Add(controlSizer); dialogSizer->Add(20, 20); dialogSizer->Add(buttonSizer, 0, wxALIGN_CENTRE);
SetSizer(dialogSizer); SetAutoLayout(TRUE); Layout();
}
frmLogin::~frmLogin(){ appLogin_children.DeleteObject(this); }
void frmLogin::Login(wxCommandEvent &event){ (void)wxMessageBox(_T("Testing only..."), _T("About Testing")); }
BEGIN_EVENT_TABLE(frmLogin, wxMDIChildFrame) EVT_BUTTON(frmLogin_Login, frmLogin::Login) END_EVENT_TABLE()
Post Edited (09-17-03 20:05)Meow~ |