Print Page | Close Window

Tooltip icon different from icon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Visual C++ MFC
Forum Description: Topics related to Codejock Visual C++ MFC products
URL: http://forum.codejock.com/forum_posts.asp?TID=16078
Printed Date: 04 December 2024 at 1:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tooltip icon different from icon
Posted By: ione
Subject: Tooltip icon different from icon
Date Posted: 26 January 2010 at 12:17pm
Hi, I need a CXTPControlPopup displaying a tooltip icon different from its icon. Is it possible? I need it for System Button on Ribbon.
 
Thank you.



Replies:
Posted By: ione
Date Posted: 28 January 2010 at 4:44am
Hi, maybe this picture could explain what I mean:
 
 
System button displays Windows logo while tooltip displays another picture.
 
 


Posted By: znakeeye
Date Posted: 27 February 2010 at 7:37am
I really need this too!

-------------
PokerMemento - http://www.pokermemento.com/


Posted By: Oleg
Date Posted: 01 March 2010 at 1:49am
Hi,
 
Just set bigger image for same Id - RibbonSample has it.


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


Posted By: ione
Date Posted: 01 March 2010 at 3:29am

Actually, my RibbonSample doesn't have it. (ToolkitPro 11.1.3)

I've tried, but it doesn't work. Main button shows the large image. This is my new code:
 

pControlFile->GetCommandBar()->SetIconSize(CSize(32, 32));

pControlFile->SetIconId(ID_MAINBUTTON);

UINT uCommand = {ID_MAINBUTTON};

pCommandBars->GetImageManager()->SetIcons(IDB_GEAR, &uCommand, 1, CSize(32, 32), xtpImageNormal);

pCommandBars->GetImageManager()->SetIcons(IDB_GEAR_LARGE, &uCommand, 1, CSize(96, 96), xtpImageNormal);



Posted By: Oleg
Date Posted: 01 March 2010 at 2:11pm

Hi,

Not sure about 11.1.3... try then pToolTipContext->ShowImage + some non zero base offset and set each icon to Id+thisOffset.


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


Posted By: ione
Date Posted: 02 March 2010 at 3:36am
Hi Oleq, thank you very much. It works!
 
My problem here is that this offset is applied to all options in the Ribbon, since pTooltipContext is owned by pCommandBars.
Is there any way to have different images for icon and tooltip just for the main system button, having the same icon id for the rest of button-tooltips?
 
 


Posted By: ione
Date Posted: 05 March 2010 at 6:16am
Hi, already solved the isue.
Just replace the icon size to be loaded in DrawRibbonFrameSystemButton (ICON_SMALL).
This way the system button displays small icon while tooltip displays the big one.
 
 



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