Is your “child” actually a full sized overlay like in Steam or such?
SendMessage or PostMessage can be used to send messages to other windows, including the parent window.
In general you don't want to send all events to a parent, for example size events, paint events, etc. would probably cause trouble.
Also in the general case mouse events would cause issues, you would need to adjust the parameters as they are client coordinates, and in the general case, a child and parents client area is not the same.
For mouse events, if I recall for plain Win32 the general solution is to handle WM_NCHITTEST and return HTTRANSPARENT , for keyboard, I am not sure why you would take focus if you didn't want it.
DividedByZero said:
As a side question, is it possible to get a pointer to the parent windows callback given HWND alone?
Yes, the window procedure is stored as `GWLP_WNDPROC`. If you want to “override” a windows procedure, use `SetWindowLongPtr` to set it to a new value, the previous one will be returned (note, I believe not guaranteed to be a callable function pointer). If you just want to get it but not change, `GetWindowLongPtr`. You can then call it with `CallWindowProc`.
This is one of the ways to “subclass” a window to add additional functionality.
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-callwindowproca
Usually, all windows with the same class share one window procedure. A subclass is a window or set of windows with the same class whose messages are intercepted and processed by another window procedure (or procedures) before being passed to the window procedure of the class.
The other way to subclass windows is using `SetWindowSubclass`, which has some advantages, such as handling an extra DWORD_PTR sized data value which you can use for any purpose (e.g a pointer to your own class/struct), and calling the old window procedure properly using `DefSubclassProc` (you would otherwise need to store that old GWLP_WNDPROC value somewhere yourself!).
https://docs.microsoft.com/en-us/windows/win32/api/commctrl/nf-commctrl-setwindowsubclass