|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Christoph Luedi
|
Apr 13, 2007 - 2:39 PM
|
I added a toolbar to my dialog class as described in the F.A.Q. The icons are visible, and the message handlers (implemented in the dialog class) are called, but I don’t see the tooltips.
If I change a toolbar button ID to a global command id (e.g. ID_FILE_NEW), then the tooltip is displayed and the corresponding action is executed.
I call g_CmdManager->UpdateFromToolBar() in the dialog class.
What am I missing to display the tooltips? I have a demo application, but maybe you can answer this directly?
Thanks
|
|
Technical Support
|
Apr 15, 2007 - 11:20 AM
|
If you configured the reference between the dialog window and command manager’s profile, then if you update this profile from the toolbar resource with non-empty tooltip strings, you should see tooltips displayed. The ProfUIS_Controls sample demonstrates toolbars with tooltips in the main dialog window, dialog page with toolbars and dialog page with a status bar where you can insert a toolbar into the status bar’s pane. You can send us a test project that demonstrates what’s wrong so we can help with this.
|
|
Christoph Luedi
|
Apr 15, 2007 - 11:44 AM
|
Thanks a lot both of you for your answers, I have found the problem.
Maybe that’s interesting for other readers so I post it here... analyzing the UpdateFromToolBar() code, I found this segment:
bool CExtCmdItem::TipsLoad() {
....
int nSep = sText.ReverseFind(’\n’); if( nSep < 0 ) { //m_sTipTool = sText; // (- v.2.24) m_sTipStatus = sText; // (+ v.2.24) return true; } .... }
Well my tooltips, that worked well before moving to prof-uis, were simple strings without the \n separation between status and tooltip text. After I added the \n separator, everything works well!
Thanks Chris
|
|
Suhai Gyorgy
|
Apr 15, 2007 - 4:42 AM
|
One solution that will work for sure:CExtCmdItem * p_cmd;
p_cmd = g_CmdManager->CmdGetPtr( ID_... );
ASSERT( p_cmd != NULL );
p_cmd->m_sTipTool = _T( "ToolTip of command ID_..." );
|
|