Is there a message for "control loses focus?" I'm shadowing all of my controls' values into a struct and would like to update each member as the mouse leaves each control (rather than updating all of them when any control is changed.) Any ideas? Is subclassing the only answer?
WM_KILLFOCUS is sent to a window just before it loses focus.
Is that what you mean?
I used "TrackMouseEvent" to make my 3 state (up enter/leave down) button in WM_MOUSEMOVE msg.
I'm hoping for a "WM_LOSESFOCUS" message but there doesn't appear to be anything like this. Basically I have a window with some controls on it (edit boxes, checkboxes, etc.) and I have all their states and values shadowed into a struct. This makes it easy to save and restore the state of all controls, simply by using Get/WritePrivateProfileStruct to an .ini file. But in my current implementation, all the controls are copied to the structure whenever the window loses focus (on WM_ACTIVATE message.) But if I change one value then press the "go" button lets say, the changed value has not been updated in the shadow struct yet, so errors occur. What I want to do it catch some message when the mouse or focus leaves each individual control - so that the control losing focus can have it's new value copied into the shadow struct. :) Hope I made that clear enough. It's kinda hard to explain and a nightmare to look at as code. :)
Hmm... looks like it's gonna be subclassing or the parent tracking the mouse for each individual component. :bdg
I think subclassing would be better; especially if it's mostly only for edit boxes(?)