Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Floating bar focus detection. Collapse All
Subject Author Date
Leo Mortero Jun 15, 2004 - 10:41 AM

How can you find out when a floating control bar has focus?  With the floating bar active I’ve tried calling ::GetFocus() but the function is returning NULL.  Try the same call when the bar is docked though and it will return a valid handle.

Technical Support Jun 24, 2004 - 2:49 AM

Dear Leo,

We confirm the problem with NULL returned from the ::GetFocus() API. We use an alternative method of detecting when the floating control bat gets active/inactive in the CExtControlBar class. It is based on the CControlBar::OnUpdateCmdUI virtual method. Please take a look at how the CExtControlBar::OnUpdateCmdUI method is implemented in the ExtControlBar.cpp file. It calculates the m_bWindowActive value and redraws the caption in the non-client area if the active state has changed.