The SetWindowCallback function is a comfortable way with regard to the treatment of events. But according to the WinApi the API functions GetMessage, TranslateMessage and DispatchMessage should also work. My problem is: These functions require only a pointer to the structure MSG. How do they know what procedure in my PB-code is responsible for the handling of events? Shouldn't there be a pointer to my callback procedure as it is the case when I use: SetWindowCallback(@MyCallbackProcedure)?
P.S.
SetWindowCallback, WaitWindowEvent, WindowEvent - these all work fine. I only want to get a deeper inside in WinAPI. That's why I did post this question.
Callback and GetMessage
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
- Fluid Byte
- Addict
- Posts: 2336
- Joined: Fri Jul 21, 2006 4:41 am
- Location: Berlin, Germany
AFAIK you are not able to obtain this pointer as this would interfere with PB's internal event loop. It's the same problem with the IsDialogMessage_() command wich would enable keyboard navigation like in standard Windows dialogs but you would need the pointer to the MSG structure as well.My problem is: These functions require only a pointer to the structure MSG.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?