Ok, first off i'll start with my (shaky) understanding of window focus (which is probably very wrong):
I have in my mind the idea that other than windows which obviously give and take focus (ie. top level windows, mdi childs), that every sibbling window within a given parent can take *some* form of focus (keyboard input focus or something?) from its sibblings, right? Which would logically mean they would receive some kind of message when they receive or lose focus. I've been playing around with WM_ACTIVATE but it never seems to be sent to my windows, or other apps that I "spy" on (using Spy++).
I'm now completely and utterly confused, so could anyone point me in the right direction... maybe an article to read or a message to pay attention to or *anything*??
Thanks for your time,
Have you looked into WM_SETFOCUS and WM_KILLFOCUS?
Yup I have, but I don't seem to be receiving any (other than my top-level window and some sliders I had for testing in one of my windows). Is there some flag I should be setting when I create my window to allow it to grab the focus, or do I have to do this manually or something?
Not sure if I explained myself with the "or do this manually or something".
Basically what I meant, is do I have to claim the focus somehow when a user clicks my window or something?
Use SetFocus() to get the keyboard/input focus. It will send out the WM_KILLFOCUS and WM_SETFOCUS messages.