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.
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
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.
Andy
PS The notifications for Edit control can be found here:
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?