|
|
|
|
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 |
|
Ed Nafziger
|
Aug 20, 2008 - 12:40 PM
|
I am using a CExtControlBar derived class to display a docked and resizable panel window. I want the window to alwasy be docked, and never to become a floating window. How can I accomplish this?
|
|
Technical Support
|
Aug 21, 2008 - 1:30 PM
|
You can simply use your own CExtControlBar -derived class which implements the CExtControlBar::FloatControlBar() and CExtControlBar::ToggleDocking() virtual methods. The overridden methods should have empty bodies. But such control bar will work well only when old Visual Studio .NET style drag-n-dropping algorithm for control bars is used. This algorithm draws frames on the screen surface for highlighting target bar areas. The new Visual Studio 2005/2008 style algorithm switches bars into floating state during drag-n-dropping and disabling floating state switching will make it inconvenient. You can make Prof-UIS constantly using one preferred drag-n-dropping algorithm for resizable control bars like demonstrated in the TabbedBars sample application.
Besides, you will also need to disable floating state for tabbed bar containers which are CExtDynTabControlBar objects (also kind of CExtControlBar ). You will need to create similar small CExtDynTabControlBar -derived class with empty overridden CExtControlBar::FloatControlBar() and CExtControlBar::ToggleDocking() virtual methods. To make Prof-UIS using your tabbed container bar you should handle the CExtControlBar::g_nMsgCreateTabbedBar registered message in your main frame window:
#include <../Src/ExtControlBarTabbedFeatures.h>
. . .
class C_YOUR_DynTabControlBar : public CExtDynTabControlBar
{
. . .
};
. . .
ON_REGISTERED_MESSAGE( CExtControlBar::g_nMsgCreateTabbedBar, OnMsgCreateTabbedBar )
. . .
LRESULT CMainFrame::OnMsgCreateTabbedBar( WPARAM wParam, LPARAM lParam )
{
lParam;
CExtDynTabControlBar ** ppBar = (CExtDynTabControlBar **)wParam;
(*ppBar) = new C_YOUR_DynTabControlBar;
return 0L;
}
|
|
Ed Nafziger
|
Aug 20, 2008 - 1:07 PM
|
|
|