Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC
  New Posts New Posts RSS Feed - Tooltip icon different from icon
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedTooltip icon different from icon

 Post Reply Post Reply
Author
Message
ione View Drop Down
Groupie
Groupie


Joined: 25 November 2009
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote ione Quote  Post ReplyReply Direct Link To This Post Topic: Tooltip icon different from icon
    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.
Back to Top
ione View Drop Down
Groupie
Groupie


Joined: 25 November 2009
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote ione Quote  Post ReplyReply Direct Link To This Post 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.
 
 
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2010 at 7:37am
I really need this too!
PokerMemento - http://www.pokermemento.com/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 01 March 2010 at 1:49am
Hi,
 
Just set bigger image for same Id - RibbonSample has it.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ione View Drop Down
Groupie
Groupie


Joined: 25 November 2009
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote ione Quote  Post ReplyReply Direct Link To This Post 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);

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
ione View Drop Down
Groupie
Groupie


Joined: 25 November 2009
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote ione Quote  Post ReplyReply Direct Link To This Post 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?
 
 
Back to Top
ione View Drop Down
Groupie
Groupie


Joined: 25 November 2009
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote ione Quote  Post ReplyReply Direct Link To This Post 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.
 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.