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.
Subject |
Author |
Date |
|
Dmitri Zhukov
|
Mar 17, 2004 - 8:12 AM
|
I have have several CExtControlBars which can be docked inside tabbed container (by the user). When floating or docked I can activate them by SetFocus(). How to detect if the window is inside tabbed container and activate it (I guess I need CExtTabPageContainerWnd::PageSelectionSet() - but I’ve no idea where to get it)?
|
|
Technical Support
|
Mar 17, 2004 - 10:08 AM
|
Hi Dmitri,
First of all, you can activate any resizable bar (no matter in which state it is) just by sending a corresponding command message to the mainframe window:
pMainFrame->SendMessage( WM_COMMAND, ID_OF_YOUR_BAR );
To detect whether a resizable bar is inside a dynamic tab container, you should get its parent window and determine which class it belongs to:
// you will need some headers, so
#include <../Src/ExtControlBarTabbedFeatures.h>
. . . .
CWnd * pWndParent = pBar->GetParent();
if( pWndParent->IsKindOf(RUNTIME_CLASS(CExtDockDynTabBar)) )
{
// the window pointed to by pBar is inside a tab container
}
There is also another way, which may be used with the CExtControlBar class. If the CExtControlBar::_GetNearestTabbedContainer() internal protected method returns NULL , the bar is not inside a tab container. So, just create your own class derived from CExtControlBar and make GetNearestTabbedContainer() public.
|
|