From: Drew on
I'm trying to reproduce the behavior of Visual Studio where the tabs show
the filename and when you hover over the tab it gives you the full path to
that file. I started the MDI project as having Visual styles and colors:
Visual Studio 2005. I'm developing in VS 2008 if that matters.

Thanks,
Drew


From: Ajay Kalra on
On Feb 8, 1:06 pm, "Drew" <d...(a)dam.com> wrote:
> I'm trying to reproduce the behavior of Visual Studio where the tabs show
> the filename and when you hover over the tab it gives you the full path to
> that file. I started the MDI project as having Visual styles and colors:
> Visual Studio 2005. I'm developing in VS 2008 if that matters.
>
> Thanks,
> Drew

You can change the content of the tooltip by using call backs. Take a
look at TTN_NEEDTEXT notification. When you get the callback, you can
put the text that you want.

-
Ajay
From: Joseph M. Newcomer on
You may have to roll your own tooltip-like facility. Tooltips have rather, shall we say,
"quaint" ideas, such as the fact that a tooltip is limited to 80 characters on a single
line (too small for many file paths). You can find a tooltip-like facility in several of
my projects on my MVP Tips site, including the thread affinity explorer, the locale
explorer, and the Async I/O explorer (all variants on the same basic code)
joe
On Mon, 8 Feb 2010 12:06:48 -0600, "Drew" <dam(a)dam.com> wrote:

>I'm trying to reproduce the behavior of Visual Studio where the tabs show
>the filename and when you hover over the tab it gives you the full path to
>that file. I started the MDI project as having Visual styles and colors:
>Visual Studio 2005. I'm developing in VS 2008 if that matters.
>
>Thanks,
>Drew
>
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Drew on
Turns out there is a documented way. I can't seem to find the link again
(confounded MSDN) but it's essentially:

BEGIN_MESSAGE_MAP(CMyMDIFrameWndEx, CMDIFrameWndEx)
// ...
ON_REGISTERED_MESSAGE(AFX_WM_ON_GET_TAB_TOOLTIP, GetTabToolTip)
END_MESSAGE_MAP()


LRESULT CMyMDIFrameWndEx::GetTabToolTip(WPARAM /*wp*/, LPARAM lp)
{
CMFCTabToolTipInfo* pInfo = (CMFCTabToolTipInfo*) lp;
ASSERT (pInfo != NULL);

if (pInfo)
{
ASSERT_VALID (pInfo->m_pTabWnd);
if (!pInfo->m_pTabWnd->IsMDITab ())
{
return 0;
}
pInfo->m_strText.Format (_T("Tab #%d Custom Tooltip"),
pInfo->m_nTabIndex + 1);
}

return 0;
}

Thanks,
Drew

"Drew" <dam(a)dam.com> wrote in message
news:%23ey5XnOqKHA.4604(a)TK2MSFTNGP05.phx.gbl...
> I'm trying to reproduce the behavior of Visual Studio where the tabs show
> the filename and when you hover over the tab it gives you the full path to
> that file. I started the MDI project as having Visual styles and colors:
> Visual Studio 2005. I'm developing in VS 2008 if that matters.
>
> Thanks,
> Drew
>


From: Tom Serface on
This class might help you get some ideas:

http://www.codeproject.com/KB/tabs/AMCustomTabCtrlDemo.aspx

Tom

"Drew" <dam(a)dam.com> wrote in message
news:#ey5XnOqKHA.4604(a)TK2MSFTNGP05.phx.gbl...
> I'm trying to reproduce the behavior of Visual Studio where the tabs show
> the filename and when you hover over the tab it gives you the full path to
> that file. I started the MDI project as having Visual styles and colors:
> Visual Studio 2005. I'm developing in VS 2008 if that matters.
>
> Thanks,
> Drew
>
 | 
Pages: 1
Prev: CFileDialog
Next: Saving as PDF?