WndProc: Not getting any key-input messages even though window has focus

Hello,

for some reason which makes no sense to me, I wont' receive any key-events (WM_KEYDOWN/WM_KEYUP/WM_CHAR/etc) in the WndProc for my window as soon as it is a child of some other window (works fine if it is top-level). I do receive all mouse messages, and I do have the focus (I do get WM_SETFOCUS and for sanity I do check if GetFocus() returns the window handle in question). Though, no keyboard input.
(Also BlockInput() is never called, which to my knowledge should be the only way keyboard input is blocked, even if the window has the focus.)

What could possibly cause this behaviour ? I don't get it. Can somebody help ?

Cheers.
Last edited on
Sounds strange. All I can say is that the Window Procedure for whatever Class of window has the focus should get all messages pertaining to that window.

If you have two windows, and one window is a child of the other, when the child has the focus, the Window Procedure of the child should get message notifications.

Where things get a bit tricky is where a child window is one of the predefined controls or a Custom Control, or even an ActiveX Control - which is an alternate control architecture. In these instances the Window Procedure may not (and likely won't - unless you wrote the control) be in your code, so you won't get any messages - unless you subclass.
Topic archived. No new replies allowed.