Print Page | Close Window

tooltip on sysmenu icon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=17555
Printed Date: 26 February 2025 at 8:57pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: tooltip on sysmenu icon
Posted By: GBrookman
Subject: tooltip on sysmenu icon
Date Posted: 12 November 2010 at 6:25pm
I had a request to add a tooltip to the sysmenu icon when in ribbon mode. This works but I suspect there's a better/smarter way:
LRESULT CMainFrame::OnControlSelected(WPARAM wParam, LPARAM lParam)
 {
     UNUSED_ALWAYS(lParam);
     if ( CXTPControl* pControl = (CXTPControl*)wParam )
     {
        if ( 0 == pControl->GetIconId() )
        {
            pControl->SetIconId(XTP_ID_MENUBAR_SYSMENU);
            pControl->SetTooltip(_T("MyApp Sysmenu"));
            pControl->SetDescription(_T("Click here to open, save or print \nand see everything else you can do with MyApp"));
        }
     }

     return 0;
 }

I determined the zero icon ID empirically by debugging.

Thanks,
Gary



Replies:
Posted By: Oleg
Date Posted: 15 November 2010 at 4:19am
Hi,

I'd recommend set these parameters in moment you create Ribbon - just use GetSystemButton method to retrieve pointer to this button.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: GBrookman
Date Posted: 15 November 2010 at 11:19am
thanks, knew there must be a smarter way :)




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net