Print Page | Close Window

Tooltips for toolbars in a view

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=10274
Printed Date: 14 November 2025 at 8:08pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tooltips for toolbars in a view
Posted By: dennisV
Subject: Tooltips for toolbars in a view
Date Posted: 17 April 2008 at 8:00am
Hello all,

I've got some toolbars embedded in view-derived classes and they're not getting the nice tooltips (Office2007-style). Toolbars that are in the frame windows have them though because of the following code:

CXTPToolTipContext* pToolTipContext = pCommandBars->GetToolTipContext();
pToolTipContext->SetStyle(xtpToolTipOffice2007);
pToolTipContext->ShowTitleAndDescription();
pToolTipContext->SetFont(pCommandBars->GetPaintManager()->GetIconFont());
pToolTipContext->ShowImage(true);    // Get a pointer to the command bars object.

but in the view classes I don't have a command bars object...

Is there any easy way to have the tooltips in this style there as well, or do I have to override the OnToolHitTest() function (that's being the ugly way :))?

Thanks in advance.


-------------
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)



Replies:
Posted By: Oleg
Date Posted: 17 April 2008 at 8:42am
Hi,
There was samle in forum how to attach some pCommandBars to single Toolbar.
 
Try to search with "SetCommandBars" string.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: dennisV
Date Posted: 17 April 2008 at 8:58am
Thank you!

I found and used code from this topic and it works perfectly

http://forum.codejock.com/forum_posts.asp?TID=6700&KW=SetCommandBars


-------------
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net