Alos posted here:

I'm making my own custom framework and had problems with getting common events to occur so I'm just writing them myself and managing it all in an object, my current problem is that I cannot find out how to get a hold of the visible points so I can store the x/y values to an internal RECT ready for comparing against the x/y provided in the WM_LBUTTONDOWN event which I can then use to force focus on an internal window (if not internal it falls back to DefWindowProc). One final mention is that this framework is being done in C89/90 so any example code will need to be done with that in mind. All events are being routed through a single event that manages passing onto framework events. Any help would be appreciated.
I'm not quite sure about what you want to do.

The WM_LBUTTONDOWN message is sent to the window which contains the mouse cursor, the position being in client coords (relative to the top left corner of the client area of the window.) So if your windows are all actual windows, you should be able to identify which window the message is intended for by using the HWND value. Or are you drawing your own "windows" in a single actual window?

Was gonna say something but then figured out why I wasn't getting focus which down to the main loop for it, had NULL instead of msg.hwnd, as a result I no longer need the window/client points. Thank you any ways XD
Out of interest, you said:

I [...] had problems with getting common events to occur

Which events did you have a problem with??

All of them, example text being entered into an EDIT control or the caret appearing in said control when click on it, stuff like that.

Edit: Are there specific procedures I'm supposed to pass them onto or something? If there are I was unable to locate them on the net.

Edit: Going to bed, probably won't respond until tuesday since I have work tomorrow.
Last edited on
All of an Edit control's events, or "notifications", are sent as WM_COMMAND messages to its parent window. So if you want to wrap an Edit control's HWND in a class which handles the events itself, you need to use message reflection.


PS The notifications for Edit control can be found here:

Edit Control Notifications
Thanks I'll try that out, though I'm already considering providing default handlers myself if only to ensure things like OpenGL and DirectX can use comfortably the same set of events... unless windows already has such handlers?
Topic archived. No new replies allowed.