Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Toolbar - tool tips

Toolbar - tool tips

Scheduled Pinned Locked Moved C / C++ / MFC
rubyquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tony Teveris
    wrote on last edited by
    #1

    The following code BOOL CMainFrame::OnToolTipNotify( UINT id, NMHDR * pNMHDR, LRESULT * pResult ) { TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR; UINT nID = pNMHDR->idFrom; if (pTTT->uFlags & TTF_IDISHWND) { // idFrom is actually the HWND of the tool nID = ::GetDlgCtrlID((HWND)nID); if(nID) { // pTTT->lpszText = MAKEINTRESOURCE(nID); // pTTT->hinst = AfxGetResourceHandle(); // return(TRUE); } } else { strcpy(pTTT->szText,"Ruby Red GSC-XXX\nRuby Red"); pTTT->lpszText = NULL; pTTT->hinst = NULL; return TRUE; } return(FALSE); } Gets executed when I have my cursor over one of my items in the toolbar but the tooltip does not get displayed at the toolbar button or on the status bar of the app. Why ? I figured it out, I needed to add: pTTT->lpszText = pTTT->szText; then the tip displayed by the button but not the status bar of the app. Tony Teveris Gerber Scientific Products Senior Software Engineer Phone: 860 648 8151 Fax: 860 648 8214 83 Gerber Road West South Windsor, CT 06074

    R 1 Reply Last reply
    0
    • T Tony Teveris

      The following code BOOL CMainFrame::OnToolTipNotify( UINT id, NMHDR * pNMHDR, LRESULT * pResult ) { TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR; UINT nID = pNMHDR->idFrom; if (pTTT->uFlags & TTF_IDISHWND) { // idFrom is actually the HWND of the tool nID = ::GetDlgCtrlID((HWND)nID); if(nID) { // pTTT->lpszText = MAKEINTRESOURCE(nID); // pTTT->hinst = AfxGetResourceHandle(); // return(TRUE); } } else { strcpy(pTTT->szText,"Ruby Red GSC-XXX\nRuby Red"); pTTT->lpszText = NULL; pTTT->hinst = NULL; return TRUE; } return(FALSE); } Gets executed when I have my cursor over one of my items in the toolbar but the tooltip does not get displayed at the toolbar button or on the status bar of the app. Why ? I figured it out, I needed to add: pTTT->lpszText = pTTT->szText; then the tip displayed by the button but not the status bar of the app. Tony Teveris Gerber Scientific Products Senior Software Engineer Phone: 860 648 8151 Fax: 860 648 8214 83 Gerber Road West South Windsor, CT 06074

      R Offline
      R Offline
      Rahim Rattani
      wrote on last edited by
      #2

      In your CMainFrame class there is a variable as CStatusBar m_wndStatusBar; Now to set the text on your status bar use m_wndStatusBar.GetStatusBarCtrl().SetText("Your Text",0,0); Rahim Rattani Software Engineer, Matrix Systems (Pvt) Ltd., Karachi - Pakistan

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups