Well, the simplest way is to add this to your message loop:
Code:
while( GetMessage(&msg, NULL, 0, 0) > 0) {
DispatchMessage(&msg);
TranslateMessage(&msg);
if(msg.message == WM_KEYDOWN) {
SendMessage(hChild, msg.message, msg.wParam, msg.lParam);
}
//...
}
But this is not a good long term solution, and so for that I would suggest using the "controller" paradigm often pushed in the C++ community. This is a lengthy issue and so I won't go into much detail, but there are many good books on the theory, ("C++ in Action" by Bartosz Milewski comes to mind...). Suffice it to say it is a real solution to the entire problem of reliably controlling Windows.