Hello everyone, i'm trying to figure this out. I have a main window class and a "new document" dialog class, i want the dialog to appear on app startup by default. I can't just call ShowModal () on my dialog from the main window constructor, because that will block the redraw events on the main window. I've tried the following and several variations of it, from my main window constructor:
Code: Select all
wxMenuEvent *ev = new wxMenuEvent (wxID_ANY, wxID_NEW);
QueueEvent (ev);
...however the event just doesn't get processed. I've also tried AddPendingEvents () with a wxEvent as my mainwindow class member, same. Any tips?
/* edit */ Forgot to add, wxID_NEW is the same ID as my "file->new" menu item. Selecting it from the menu, or pressing its keyboard shortcut, both work fine. Clicking the toolbar entry with the same ID also works.