If you take a look at Visual Studio 2012, you\'ll notice that if you use the mouse wheel, the window under your mouse will scroll, and not the focused window. That is, if yo
Handle the WM_MOUSEWHEEL message in both the parent and in child windows that should receive the message.
Do something like this in your WM_MOUSEWHEEL handler for your child window:
POINT mouse;
GetCursorPos(&mouse);
if (WindowFromPoint(mouse) != windowHandle)
{
// Sends the WM_MOUSEWHEEL message to your parent window
return DefWindowProc(windowHandle, message, wParam, lParam);
}
Then in the WM_MOUSEWHEEL handler for your parent window you do:
POINT mouse;
GetCursorPos(&mouse);
HWND hwnd = WindowFromPoint(mouse);
SendMessage(hwnd, message, wParam, lParam);
This way, if the child window has focus, the other window that actually has the mouse pointer hovering over it will receive the WM_MOUSEWHEEL message.