Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Graphical Tooltip for system button?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Graphical Tooltip for system button?

 Post Reply Post Reply
Author
Message
swuk View Drop Down
Newbie
Newbie


Joined: 29 March 2008
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote swuk Quote  Post ReplyReply Direct Link To This Post Topic: Graphical Tooltip for system button?
    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?
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: 08 April 2008 at 1:55am
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
Back to Top
swuk View Drop Down
Newbie
Newbie


Joined: 29 March 2008
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote swuk Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2008 at 10:00am
Fantastic! And thanks for such a fast reply! 
Back to Top
Didi View Drop Down
Groupie
Groupie


Joined: 05 July 2013
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Didi Quote  Post ReplyReply Direct Link To This Post Posted: 29 November 2013 at 10:24am
Can I also load images like that at runtime?
I.e. anpreview of documents?
Back to Top
Didi View Drop Down
Groupie
Groupie


Joined: 05 July 2013
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Didi Quote  Post ReplyReply Direct Link To This Post Posted: 29 November 2013 at 11:06am
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
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 886
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 05 December 2013 at 11:57am
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


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.219 seconds.