Professional UI Solutions
Site Map   /  Register


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 Tech Support » How to detect if a pinnable window has been activated with a mouse click Collapse All
Subject Author Date
Kevin Eshbach Aug 15, 2008 - 8:56 AM

I’m trying to detect if a CFrameWnd contained within a CExtDynAutoHideSlider has been activated by the user clicking on it.  How do I determine that a pinnable window has been activated by a mouse click?  I can’t find anything looking through CExtDynAutoHideSlider.


Kevin Eshbach

Technical Support Aug 15, 2008 - 3:34 PM

The CExtControlBar window implements a control bar. It’s designed as a container for only one child window. This child window is automatically resized for covering the entire bar’s client area and when the bar window becomes focused, it immediately sets focus to its child window. The CExtDynAutoHideSlider window does the same and looks exactly like the control bar. There is only one CExtDynAutoHideSlider window that is always created inside main frame window. When the bar is auto hidden and CExtDynAutoHideSlider window is invisible, the bar’s child window is inside the bar window. When CExtDynAutoHideSlider becomes visible, the bar’s child window is moved into the CExtDynAutoHideSlider window using the SetParent() Win32 API. When the CExtDynAutoHideSlider window becomes invisible then its child window returned back into the control bar window using the same API. The SetParent() Win32 API causes the WM_WINDOWPOSCHANGED Win32 API standard message be sent to bar’s child window. You can simply handle this message in bar’s child window and analyze its parent window.