Re: Feature Pack ToolTips displayed under Dockable Pane
All code is generated by the application wizard and the toolbar is correctly
created as a child of the dockable pane.
The only change required to reproduce this issue is setting the "Prompt"
property on the toolbar button (in the resource editor) to display a
tooltip.
When the dockable panel is docked, the tooltip displays correctly. When
undocked, it is displayed under the floating mini-frame (you may have to
shrink it to see the tooltip behind).
int CFileView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDockablePane::OnCreate(lpCreateStruct) == -1)
return -1;
CRect rectDummy;
rectDummy.SetRectEmpty();
// Create view:
const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES |
TVS_LINESATROOT | TVS_HASBUTTONS;
if (!m_wndFileView.Create(dwViewStyle, rectDummy, this, 4))
{
TRACE0("Failed to create file view\n");
return -1; // fail to create
}
// Load view images:
m_FileViewImages.Create(IDB_FILE_VIEW, 16, 0, RGB(255, 0, 255));
m_wndFileView.SetImageList(&m_FileViewImages, TVSIL_NORMAL);
m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_EXPLORER);
m_wndToolBar.LoadToolBar(IDR_EXPLORER, 0, 0, TRUE /* Is locked */);
OnChangeVisualStyle();
m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS |
CBRS_FLYBY);
m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER |
CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT |
CBRS_BORDER_RIGHT));
m_wndToolBar.SetOwner(this);
// All commands will be routed via this control , not via the parent frame:
m_wndToolBar.SetRouteCommandsViaFrame(FALSE);
// Fill in some static tree view data (dummy code, nothing magic here)
FillFileView();
AdjustLayout();
return 0;
}
"Tom Serface" wrote:
Maybe the parent for the tooltip control is the window under your pane. I'd
start by looking at the code where the toolbars are added to the panes and
make sure the parent is correct.
Tom
"Alexei" <Alexei@discussions.microsoft.com> wrote in message
news:5D99B76E-D4A8-4D5D-929C-CCD09E6B1FFC@microsoft.com...
I created a sample app with the wizard that has a docakable navigator pane.
When docked, the tooltips display properly. When I undock the pane and
try
to see the tooltips for any of the buttons on a toolbar on that pane, the
tooltips display under the undocked pane.
Microsoft Visual Studio 2008
Version 9.0.30729.1 SP