Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Tooltip with Title an Description
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tooltip with Title an Description

 Post Reply Post Reply
Author
Message
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 266
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Topic: Tooltip with Title an Description
    Posted: 04 November 2010 at 12:28pm
I have activated this kind of tooltip for menu items. (ShowTitleAndDescription(TRUE))
Problem: Some menu items do not have Title AND Description in the Resource and for this case an oldstyle tooltip appears.

Question:
Is there a way to supply lets say an user defined description for that menu items?
Is there somehing like an callback or message for that?

Thanks for your help!
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: 05 November 2010 at 1:20pm
Hi,

you can manually set it with pControl->SetDescription method.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 266
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Posted: 08 November 2010 at 3:36am
Thank you for that information. I know that, but setting it with SetDesicription is almost the same as setting it in the resource to avoid that probem :-)
In the case of leaking description i would use the text of the menu item + title to create the tooltip.
Any other suggestions?
Back to Top
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 266
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2010 at 10:28am
Hi Oleg!
Can I set the description (using pControl->SetDescription)  in an event that will be fired right before displaying the tooltip?
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: 12 November 2010 at 3:38am
Hi,

Please try WM_XTP_CONTROLSELECTED. 

// BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
//     //{{AFX_MSG_MAP(CMainFrame)
//     ON_MESSAGE(WM_XTP_CONTROLSELECTED, OnControlSelected)
//     //}}AFX_MSG_MAP
// END_MESSAGE_MAP()
//
// LRESULT CMainFrame::OnControlSelected(WPARAM wParam, LPARAM lParam)
// {
//     UNUSED_ALWAYS(lParam);
//     CXTPControl* pControl = (CXTPControl*)wParam;
//
//     return 0;
// }

only I'm not sure if its called before Tooltipcontext store tip.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.172 seconds.