Search found 5 matches

by ab396356
Wed Jun 20, 2018 8:35 am
Forum: General Development
Topic: Many beginner questions, trying to learn wxWidgets
Replies: 6
Views: 3196

Re: Many beginner questions, trying to learn wxWidgets

Use wxID_CLOSE, but you will need an additional event handler for that. The key event will not get automatically mapped to the wxEVT_CLOSE event. Two questions: According to the docs and auto-complete, there is no wxEVT_CLOSE , instead there is wxEVT_CLOSE_WINDOW . Does this mean that the latter is...
by ab396356
Tue Jun 19, 2018 1:36 pm
Forum: General Development
Topic: Many beginner questions, trying to learn wxWidgets
Replies: 6
Views: 3196

Re: Many beginner questions, trying to learn wxWidgets

Other ways would be to have a menu entry with an accelerator or a separate wxAcceleratorTable assigned to the frame. I tried this however I don't know what ID I'm supposed to use for the Close button on the titlebar. I tried wxID_CLOSE and wxID_CLOSE_FRAME , as in the following code: const std::vec...
by ab396356
Sun Jun 17, 2018 7:48 am
Forum: General Development
Topic: Many beginner questions, trying to learn wxWidgets
Replies: 6
Views: 3196

Many beginner questions, trying to learn wxWidgets

I am using Visual Studio 2017, wxWidgets 3.0.4, wxFormBuilder 3.7.0. As an exercise, I am trying to create a simple program that generates a valid XML file from user input (the contents of the XML are unimportant). I use XRC to keep the interface as separate from the code as possible. Aside from the...
by ab396356
Fri Jun 01, 2018 11:35 am
Forum: General Development
Topic: wxWidgets docs: Hello World example (pedantry)
Replies: 4
Views: 5536

Re: wxWidgets docs: Hello World example (pedantry)

I believe that you are not pedantic, you are just wrong. ;) See e.g. http://docs.wxwidgets.org/trunk/overview_windowdeletion.html Thanks for clearing up my confusion. Or, did you actually try to debug the code, place the breakpoint the frame's dtor and observed it was never called? No I haven't, ye...
by ab396356
Fri Jun 01, 2018 9:38 am
Forum: General Development
Topic: wxWidgets docs: Hello World example (pedantry)
Replies: 4
Views: 5536

wxWidgets docs: Hello World example (pedantry)

I apologize in advance if this was discussed before; I did a quick search before, and didn't find anything pertaining to this topic. There are memory leaks in the latest 3.1.1 Hello World example code: bool MyApp::OnInit() { MyFrame *frame = new MyFrame(); frame->Show(true); return true; } In the co...