Control Bar Focus Issue [modified] [SOLVED]
-
I have a control bar that houses a tab control which displays 'dialogs' on each of three tabs. I want to update one of the tabs based on what happens in my main app window. I don't want to bombard my control bar with thousands of update messages everytime I do anything, so I was looking for a way to update it when it gets focus. However, I don't really want to handle a get focus message on every dialog control on the tab, just to run an update. Is there no general way to see if a control bar is 'active'? (in this case, whenever focus moves to any control on any tab on the bar). Do I have to put code in my main frame to watch for mouse clicks inside the client rect of the bar? ************************************ I reached an adequate compromise with an
OnMouseActivate
on my control bar tab, anotherOnMouseActivate
in my view and a 'needs upadte' boolean member in the tab too.modified on Thursday, March 4, 2010 3:40 PM
-
I have a control bar that houses a tab control which displays 'dialogs' on each of three tabs. I want to update one of the tabs based on what happens in my main app window. I don't want to bombard my control bar with thousands of update messages everytime I do anything, so I was looking for a way to update it when it gets focus. However, I don't really want to handle a get focus message on every dialog control on the tab, just to run an update. Is there no general way to see if a control bar is 'active'? (in this case, whenever focus moves to any control on any tab on the bar). Do I have to put code in my main frame to watch for mouse clicks inside the client rect of the bar? ************************************ I reached an adequate compromise with an
OnMouseActivate
on my control bar tab, anotherOnMouseActivate
in my view and a 'needs upadte' boolean member in the tab too.modified on Thursday, March 4, 2010 3:40 PM
-
OK, a combination of
OnParentNotify
andModifyStyleEx(WS_EX_NOPARENTNOTIFY, 0)
is doing the trick, but its a bit ugly. Now I just need to detect when the whole thing loses focus....anyone? -
hi u can us parentnotify... but why are you answering your own que? if you got the solution jst edit ur post title...
I only have a partial solution - I can use
OnMouseActivate
to detect activation, but I also need to detect "focus" leaving the dialog / tab. I thought I could do it withTrackMouseEvent
andOnMouseLeave
but that doesn't work - since you get a 'dialog leave' event when any of the dialog controls are activated. When (if?) I solve it, I will modify the original post...