wm_keydown on childwindow?

I can't find a tutorial on how to handle WM_KeyDown events for a child window (Edit Box) because for some reason other UI windows i created now have focus : (.

So how would i get a WM_Keydown handle even to a child window (Edit box)?

Thank you : )
An edit control, as well as all the other predefined controls, have been pre-registered by Windows itself, and the Window Procedures for these controls are within Windows itself. These Window Procedures within Windows receive WM_KEYDOWN, WM_KEYUP, WM_CHAR, etc., messages, just as Window Procedures you have written yourself for classes you have created yourself receive them. If you want to receive these messages in your application you need to subclass the controls using SetWindowLong() and create a 'hook' procedure within your app to process (or not) the messages.
Just as freddie said. Besides, normally for an edit box you would handle WM_CHAR, unless you want to do something very special.
Topic archived. No new replies allowed.