Need to catch WM_CREATE event with all parameters. Topic is solved
Need to catch WM_CREATE event with all parameters.
Hi! I need to catch WM_CREATE event with all parameters (message, lParam, wParam) in wxFrame based class. I tried override MSWWindowProc but this not help me. First message that MSWWindowProc receives is WM_SHOWWINDOW.
- doublemax@work
- Super wx Problem Solver
- Posts: 474
- Joined: Wed Jul 29, 2020 6:06 pm
- Location: NRW, Germany
Re: Need to catch WM_CREATE event with all parameters.
Try this one:
Code: Select all
virtual bool MSWHandleMessage(WXLRESULT *result,
WXUINT message,
WXWPARAM wParam,
WXLPARAM lParam);
Re: Need to catch WM_CREATE event with all parameters.
Thanks for you reply. But unfortunately calling this function has the same effect.
- doublemax@work
- Super wx Problem Solver
- Posts: 474
- Joined: Wed Jul 29, 2020 6:06 pm
- Location: NRW, Germany
Re: Need to catch WM_CREATE event with all parameters.
I just tested it, you need to use two-step window creation to get the WM_CREATE msg. Then it will probably also work with MSWWindowProc.
Instead of:
Use:
Instead of:
Code: Select all
wxFrame *frame = new wxFrame(NULL, wxID_ANY, title);
Code: Select all
wxFrame *frame = new wxFrame();
frame->Create(NULL, wxID_ANY, title);
Last edited by doublemax@work on Tue Oct 04, 2022 7:10 am, edited 1 time in total.
Re: Need to catch WM_CREATE event with all parameters.
How to do it. Can I have an example please.doublemax@work wrote: ↑Tue Oct 04, 2022 7:03 am you need to use two-step window creation to get the WM_CREATE msg
Last edited by extream on Tue Oct 04, 2022 7:10 am, edited 1 time in total.
- doublemax@work
- Super wx Problem Solver
- Posts: 474
- Joined: Wed Jul 29, 2020 6:06 pm
- Location: NRW, Germany
Re: Need to catch WM_CREATE event with all parameters.
See my edited code above.extream wrote: ↑Tue Oct 04, 2022 7:10 amHow to do it. Can I have an example please.doublemax@work wrote: ↑Tue Oct 04, 2022 7:03 am I just tested it, you need to use two-step window creation to get the WM_CREATE msg. Then it will probably also work with MSWWindowProc.
Re: Need to catch WM_CREATE event with all parameters.
Thanks, now this is working!