Search found 110 matches

by Mick P.
Mon Sep 02, 2019 10:44 am
Forum: C++ Development
Topic: Get wxEvtHandler from event???
Replies: 23
Views: 294

Re: Get wxEvtHandler from event???

Just curious, woold like to be able to Bind an event procedure to a wxFrame for example without having to make it a method (this-call) just to get the "this" pointer, when I know that the EvtHandler itself is the wxFrame object. I can see it's possible to attach multiple handlers to the base object,...
by Mick P.
Mon Sep 02, 2019 10:40 am
Forum: C++ Development
Topic: Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?
Replies: 8
Views: 153

Re: Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?

ONEEYEMAN wrote:
Sun Sep 01, 2019 4:42 pm
Hi,
Why not use wxThread or std::thread?

Thank you.
Never would have occurred to me. Sounds like asking for trouble.
by Mick P.
Sun Sep 01, 2019 4:03 pm
Forum: C++ Development
Topic: Advise: Best handle wxMenu/accelerator event?
Replies: 24
Views: 327

Re: Advise: Best handle wxMenu/accelerator event?

Hi, Keep in mind that handling the menu should be handled at the frame level and not at wxApp level. It's working at wxApp level. In this case that's all that can work. The ports would have to all be upgraded to use setInvokingWindow to make it work otherwise, or pass the window directly to the eve...
by Mick P.
Sun Sep 01, 2019 3:56 pm
Forum: C++ Development
Topic: Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?
Replies: 8
Views: 153

Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?

Faced with a panoply of possibilities (yet again) I find myself wondering what is correct protocol :oops: I need to implement modal logic, i.e. a procedure does not return until it completes a task, but it keeps the GUI operating also. wxModalEventLoop seems to do this with also disabling existing w...
by Mick P.
Sun Sep 01, 2019 3:15 pm
Forum: Platform Related Issues
Topic: Help? GTK events do/dont's for dummies (nothing works)
Replies: 37
Views: 855

Re: Help? GTK events do/dont's for dummies (nothing works)

For the record, I recently ran into a problem that made absolutely no sense. It led me to notice the SetSize method has an additional flags parameter that includes bits for forcing the event to be processed, and also forcing the size to be applied... That sounds like something that should not be req...
by Mick P.
Sun Sep 01, 2019 11:26 am
Forum: C++ Development
Topic: Advise: Best handle wxMenu/accelerator event?
Replies: 24
Views: 327

Re: Advise: Best handle wxMenu/accelerator event?

Just posting to report wxEVT_COMMAND_TOOL_CLICKED is working, at least at the wxApp level. I think it may have been working before except for some accidents. I updated an earlier post with extra personal details. EDITED: Also, hotkeys work for the nonstandard menus. (The toolbar's do too.) Sorry, I ...
by Mick P.
Sun Sep 01, 2019 10:48 am
Forum: C++ Development
Topic: Advise: Best handle wxMenu/accelerator event?
Replies: 24
Views: 327

Re: Advise: Best handle wxMenu/accelerator event?

No need to assume, just look at the doc I wish the documentation were clear, then I would be here less. I couldn't find wxID_ANY in the Bind or Connect documentation. I don't doubt it's somewhere else, but it belongs alongside the parameters. Where were you looking? A click on the above link would ...
by Mick P.
Sun Sep 01, 2019 9:11 am
Forum: C++ Development
Topic: Advise: Best handle wxMenu/accelerator event?
Replies: 24
Views: 327

Re: Advise: Best handle wxMenu/accelerator event?

So far I devised a trick that works with Windows (untested elsewhere) that makes the menus reusable. wxWidgets should work this way itself, since duplicating menus is a headache. This is a replacement for wxMenuBar. The menu commands have to be processed at the wxApp level. There may be an "Insert" ...
by Mick P.
Sun Sep 01, 2019 7:58 am
Forum: C++ Development
Topic: Get wxEvtHandler from event???
Replies: 23
Views: 294

Get wxEvtHandler from event???

As near as I can tell wxWidgets isn't exposing the event's handler to the event itself. This seems... well odd. Is there a solution? I have to do hack because a bad menu design, and don't want to derive a custom wxFrame class just so I can add a method to bind an event to. The frame is the handler, ...
by Mick P.
Sun Sep 01, 2019 7:19 am
Forum: C++ Development
Topic: Advise: Best handle wxMenu/accelerator event?
Replies: 24
Views: 327

Re: Advise: Best handle wxMenu/accelerator event?

Here is the problem. On Windows menus don't have parents. So wxWidgets has a requirement that every submenu must be duplicated to appear in another parent menu. This is another design problem to workaround for me. It would be better if wxWidgets managed this for systems that require duplicating menu...
by Mick P.
Sun Sep 01, 2019 7:02 am
Forum: C++ Development
Topic: Advise: Best handle wxMenu/accelerator event?
Replies: 24
Views: 327

Re: Advise: Best handle wxMenu/accelerator event?

No need to assume, just look at the doc I wish the documentation were clear, then I would be here less. I couldn't find wxID_ANY in the Bind or Connect documentation. I don't doubt it's somewhere else, but it belongs alongside the parameters. Shouldn't that be: fr->Bind(wxEVT_COMMAND_MENU_SELECTED,...
by Mick P.
Sat Aug 31, 2019 6:24 pm
Forum: C++ Development
Topic: wxToolBar not playing nice with wxFrame children (client area?)
Replies: 6
Views: 129

Re: wxToolBar not playing nice with wxFrame children (client area?)

Hi, Do you have a screenshot? And the code? Thank you. For the 32px height problem? Just playing along, I happen to have shared a screenshot the other day, however the backgrounds are the same color, so it's not worth much. The code adds bitmaps. The maximum height is 22px. I tried setting the heig...
by Mick P.
Sat Aug 31, 2019 5:31 pm
Forum: C++ Development
Topic: Advise: Best handle wxMenu/accelerator event?
Replies: 24
Views: 327

Re: Advise: Best handle wxMenu/accelerator event?

Bummer, I sat down to implement this now, and finished, my wxFrame doesn't receive the events. I mean this is completely off-topic, but I feel like better to revive this topic than make anew. For the record, the handlers are added to the frame like everything else. The procedure is not called, even ...
by Mick P.
Fri Aug 30, 2019 6:19 am
Forum: C++ Development
Topic: wxToolBar not playing nice with wxFrame children (client area?)
Replies: 6
Views: 129

Re: wxToolBar not playing nice with wxFrame children (client area?)

Off-topic: Sorry to bother again! My toolbar is 32px tall on MSW. That's 5px more than the bottom of the blue square border. So it creates a lot of empty space. This may be a bug (see below) but I'm wondering if there is an obvious something I'm missing too, since 32 is like the default size of big ...
by Mick P.
Thu Aug 29, 2019 4:10 pm
Forum: C++ Development
Topic: wxPalette PNG and GIF images undocumented?
Replies: 9
Views: 172

Re: wxPalette PNG and GIF images undocumented?

I dunno. For 3D productivity software, it often has to load data much like a video game, except that the data isn't prepared in advance as it is in a game. I think wxWidget's developers could be more considerate. Images can be many megabytes. Ideally you want to load them into general memory once, a...