Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - tooltip on sysmenu icon
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

tooltip on sysmenu icon

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

Joined: 14 November 2007
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote GBrookman Quote  Post ReplyReply Direct Link To This Post Topic: tooltip on sysmenu icon
    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
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: 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
Back to Top
GBrookman View Drop Down
Newbie
Newbie
Avatar

Joined: 14 November 2007
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote GBrookman Quote  Post ReplyReply Direct Link To This Post Posted: 15 November 2010 at 11:19am
thanks, knew there must be a smarter way :)

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