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. How to make StatusBar tooltips?

How to make StatusBar tooltips?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 Posts 3 Posters 10 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.
  • S Offline
    S Offline
    Stefan 0
    wrote on last edited by
    #1

    How could I make status bar to show tool tips for its panes? Regards, Stefan ----------

    U L 2 Replies Last reply
    0
    • S Stefan 0

      How could I make status bar to show tool tips for its panes? Regards, Stefan ----------

      U Offline
      U Offline
      User 363
      wrote on last edited by
      #2

      Stefan, If the items in your status bar have ID's, then you can add them to a tooltip object like so: CWnd* pSomeItem = GetDlgItem(IDC_SOMEID); m_tooltip.Create(this); m_tooltip.Activate(TRUE); m_tooltip.AddTool(&pSomeItem, "A tool tip"); Then, in your mainframe do the following: BOOL CMainFrame::PreTranslateMessage(MSG* pMsg) { // Let the ToolTip process messages. m_tooltip.RelayEvent(pMsg); return CMDIFrameWnd::PreTranslateMessage(pMsg); } This might work. ================== The original message was: How could I make status bar to show tool tips for its panes?

      Regards,
      Stefan
      ----------

      1 Reply Last reply
      0
      • S Stefan 0

        How could I make status bar to show tool tips for its panes? Regards, Stefan ----------

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Have you tried: SendMessage ( hStatusBarWnd, SB_SETTIPTEXT, (WPARAM)(INT)iStatusBarPart, (LPARAM)(LPCTSTR)lpcszTextToDisplayAsTooltip ); code sequence? The status bar window must be created (as in the following example) using g_hStatusBarWnd = CreateWindowEx ( 0L, STATUSCLASSNAME, 0, WS_CHILD | WS_VISIBLE | SBT_TOOLTIPS, 0, 0, 0, 0, hParentWnd, (HMENU)ID_STATUSBAR, g_hInstance, 0 ); For more information, you can check the WindowsNT System Manager, where you can find, among other stuff like this, also something about status bar APIs. All the best, Sardaukar ================== The original message was: How could I make status bar to show tool tips for its panes?

        Regards,
        Stefan
        ----------

        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