Graphical Tooltip for system button? |
Post Reply |
Author | |
swuk
Newbie Joined: 29 March 2008 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 07 April 2008 at 5:38pm |
I apologize in advance for this - the answer is probably right under my nose, but I just can't see it and it's driving me crazy!
How do I get the beautiful system menu preview graphic into the tooltip that comes up for the system button? The ribbon sample has this: In my own app, I just get the text. I can't see any png/bmp in the sample's resources that contains the graphic? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
You need load this bitmap. In sample these lines load it:
UINT uiGroupsTip[] = {ID_GROUP_CLIPBOARD_OPTION, ID_GROUP_FONT_OPTION, ID_GROUP_PARAGRAPH_OPTION, ID_GROUP_STYLES_OPTION, IDB_GEAR};
pCommandBars->GetImageManager()->SetIcons(IDB_GROUPOPTIONTOOLTIP, uiGroupsTip, _countof(uiGroupsTip), CSize(100, 130)); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
swuk
Newbie Joined: 29 March 2008 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Fantastic! And thanks for such a fast reply!
|
|
Didi
Groupie Joined: 05 July 2013 Status: Offline Points: 17 |
Post Options
Thanks(0)
|
Can I also load images like that at runtime?
I.e. anpreview of documents? |
|
Didi
Groupie Joined: 05 July 2013 Status: Offline Points: 17 |
Post Options
Thanks(0)
|
Sorry, but I didn't see a change button.
I must show preview-tooltips for GalleryItems. In my class, derived from CXTPControlGalleryItem, I can only set a string for tooltip. Can I catch the tooltip's popup-message to paint my own tooltip with mfc, or is it possible to derive a tooltip-class from CXTPControlGalleryItem's tooltip? Thank you, didi |
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 886 |
Post Options
Thanks(0)
|
You can create your own tooltip window and that lets you draw/paint whatever you wish.
Subclass a CXTPToolTipContext and implement the virutal method CreateToolTip. Create your tooltip when that method is called. I'm not sure how you will get your derived tooltip context set in the command bars class. We have derived from CJ's command bars object and after contstruction, we do this: CMDTARGET_RELEASE(m_pToolTipContext);// releases the tip context CJ created in the ctor m_pToolTipContext = new JCXTPToolTipContext;// creates and replaced the CJ context with our own |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |