How to terminate the Application ? Topic is solved
-
- In need of some credit
- Posts: 1
- Joined: Sun Feb 22, 2009 10:12 am
How to terminate the Application ?
I just use wxWidgets several days, I want to quit when I want to, I don't know how to do that,Just call 'Exit()' or through wxCloseEvent? Who can give me some tips? I will appreciate.
-
- Experienced Solver
- Posts: 72
- Joined: Fri Feb 20, 2009 7:13 pm
- Location: $(#wx)\src
You should be able to call Destroy() on your current frame and that should close it by force. In my new app I've been working on out of boredom, it's very simply done:
Don't forget to declare it inside your header.
Code: Select all
void OnClose(wxCloseEvent& event)
{
Destroy();
}
void OnExit(wxCommandEvent& event)
{
Destroy();
}
-
- Earned some good credits
- Posts: 125
- Joined: Wed Mar 05, 2008 3:30 pm
I think it better to use
Code: Select all
frame->Close();
-
- Knows some wx things
- Posts: 49
- Joined: Tue Nov 25, 2008 2:12 pm