Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - Tooltip in Dialog
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tooltip in Dialog

 Post Reply Post Reply
Author
Message
skyliou View Drop Down
Newbie
Newbie
Avatar

Joined: 27 August 2009
Location: Taiwan
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyliou Quote  Post ReplyReply Direct Link To This Post Topic: Tooltip in Dialog
    Posted: 17 September 2009 at 11:51pm
Hi Oleg,

I try to add tooltip in a Dialog button, now it's work.

but i want to change style to another style, it's can't work. (like Standard style -> xtpToolTipOffice2007)

i have try ToolTipContext_vc90 this sample, but in my opinion it can only change in commandbar's component.

(i don't know how to use like "CXTPCommandBars* pCommandBars =    GetCommandBars();"  in Dialog based)

can you give me a sample  or help me to change style at button's tooltip

thank you very much

james






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: 18 September 2009 at 8:04am
Hi,
 
ToolTipContext samples also demonstrates hwo to enable tooltips for Dialog controls too.
 
You need same lines:
 
 EnableToolTips();
 
 m_moduleContext.SetModuleToolTipContext();
 m_moduleContext.SetStyle(xtpToolTipOffice2007);
 m_moduleContext.SetMaxTipWidth(200);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
skyliou View Drop Down
Newbie
Newbie
Avatar

Joined: 27 August 2009
Location: Taiwan
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyliou Quote  Post ReplyReply Direct Link To This Post Posted: 21 September 2009 at 11:49pm
Hi Oleg,

i have try your way

 EnableToolTips();
 
 m_moduleContext.SetModuleToolTipContext();
 m_moduleContext.SetStyle(xtpToolTipOffice2007);
 m_moduleContext.SetMaxTipWidth(200);

but i don't know how to correctly add tooltipcontext in a dialog based project

i can't get value in

    CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
    CXTPCommandBars* pCommandBars = pMainFrame->GetCommandBars();

    can you tell me how to use  GetCommandBars()  in a dialog

 at first should i copy below file to my project folder

ToolTipContextView.h/cpp
ToolTipContextDoc.h/cpp
ToolTipContext.h/cpp
MainFrm.h/cpp
ExplorerTheme.h/cpp
ControlFavorites.h/cpp
ChildFrm.h/cpp

sorry, i am very confuse.




Back to Top
skyliou View Drop Down
Newbie
Newbie
Avatar

Joined: 27 August 2009
Location: Taiwan
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyliou Quote  Post ReplyReply Direct Link To This Post Posted: 22 September 2009 at 4:46am
Hi Oleg,
i have a Cbutton i want to use ToolTipContext in xtpToolTipOffice2007 style.
i use

EnableToolTips();
 m_moduleContext.SetModuleToolTipContext();
 m_moduleContext.SetStyle(xtpToolTipOffice2007);
 m_moduleContext.SetMaxTipWidth(200);

in OninitialDialog, but it can't use in Cbutton, i found it can use in Toolbar
can you tell me how to use in Cbutton
thank you very much, Oleg

James
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: 23 September 2009 at 3:52am

Hi,

See PropertiesDialog.cpp  code and its CPropertiesDialog::OnToolHitTest method.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
asparagusx View Drop Down
Groupie
Groupie


Joined: 06 February 2007
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote asparagusx Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2010 at 3:20am
 This does not work at all. I have the same problem. It appears as if only standard tips are supported in Dialogs e.g. you cannot set something like Luna or Office2007 as styles for dialogs. This is a serious shortcoming as it would be nice to have the same 'look and feel' for tooltips across an application.
 
Anton
Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 443
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post Posted: 12 July 2010 at 1:26pm
I can't get this to work either.

Oleg, it is possible to have a toolbar in a dialog support the Office2007 theme (with title and desciption, etc.)? The sample does NOT achieve this.
Back to Top
asparagusx View Drop Down
Groupie
Groupie


Joined: 06 February 2007
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote asparagusx Quote  Post ReplyReply Direct Link To This Post Posted: 12 July 2010 at 1:37pm
I have been using the latest version (13.4.0) and this has not yet been implemented. A 'cluncky' workaround is to use Markup tooltips, e.g. using a StackPanel and Textblocks to produce the same 'look and feel' e.g. a title and description. The problem is that the markup tooltips are fully under your control, so they do look slightly different to the rest of the system. The optimum way would be for CJ to implement tooltips fully across all windows/toolbars.
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.203 seconds.