How can i change the border?
Jan 22, 2010 at 9:53am UTC
Hello. I make a simle window with wxwidgets. How can i change the border?
Also how can i call the destroy fuction(OnClose) with the right arrow button press?
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 32 33 34 35 36 37 38
#include <wx/wx.h>
class _Frame: public wxFrame
{
public :
_Frame(wxFrame *frame, const wxString& title);
private :
void OnClose(wxCloseEvent& event);
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(_Frame, wxFrame)
END_EVENT_TABLE()
_Frame::_Frame(wxFrame *frame, const wxString& title)
: wxFrame(frame, -1, title)
{}
void _Frame::OnClose(wxCloseEvent &event)
{
Destroy();
}
class _App : public wxApp
{
public :
virtual bool OnInit();
};
IMPLEMENT_APP(_App);
bool _App::OnInit()
{
_Frame* frame = new _Frame(0L, _("wxWidgets Application Template" ));
frame->Show();
return true ;
}
Topic archived. No new replies allowed.