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. Tooltips Won't Display

Tooltips Won't Display

Scheduled Pinned Locked Moved C / C++ / MFC
debugging
4 Posts 3 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.
  • B Offline
    B Offline
    BarryPearlman
    wrote on last edited by
    #1

    The application (CFrameWndEx) creates a dialog box (CDialogEx) with future ambitions of adding CMFCTooltipCtrl etc. I am trying to just get CTooltipCtrl to work first. In the dialog class I have: .h - CToolTipCtrl* p_TTCtrl; .ccp -

    p_TTCtrl = new CToolTipCtrl;
    ASSERT(p_TTCtrl->Create(this));

    CWnd* p_Wnd = this->GetDlgItem(IDCTL_Pref_CB_Exit);

    VERIFY(p_TTCtrl->AddTool(p_Wnd, IDCTL_Pref_CB_Exit, NULL, 0));
    p_TTCtrl->Activate(TRUE);

    When I run the debugger, there are no ASSERT or Verify errors. If I hover over IDCtrl_Pref_CB which is a checkbox created from the .rc file, nothing happens. Can someone please point out what I am missing or have wrong. Thanks, Barry

    Richard Andrew x64R V 2 Replies Last reply
    0
    • B BarryPearlman

      The application (CFrameWndEx) creates a dialog box (CDialogEx) with future ambitions of adding CMFCTooltipCtrl etc. I am trying to just get CTooltipCtrl to work first. In the dialog class I have: .h - CToolTipCtrl* p_TTCtrl; .ccp -

      p_TTCtrl = new CToolTipCtrl;
      ASSERT(p_TTCtrl->Create(this));

      CWnd* p_Wnd = this->GetDlgItem(IDCTL_Pref_CB_Exit);

      VERIFY(p_TTCtrl->AddTool(p_Wnd, IDCTL_Pref_CB_Exit, NULL, 0));
      p_TTCtrl->Activate(TRUE);

      When I run the debugger, there are no ASSERT or Verify errors. If I hover over IDCtrl_Pref_CB which is a checkbox created from the .rc file, nothing happens. Can someone please point out what I am missing or have wrong. Thanks, Barry

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      Did you add the text for the tooltip? UpdateTipText()[^] EDIT: Nevermind, I didn't notice that the AddTool function already specifies the text.

      The difficult we do right away... ...the impossible takes slightly longer.

      1 Reply Last reply
      0
      • B BarryPearlman

        The application (CFrameWndEx) creates a dialog box (CDialogEx) with future ambitions of adding CMFCTooltipCtrl etc. I am trying to just get CTooltipCtrl to work first. In the dialog class I have: .h - CToolTipCtrl* p_TTCtrl; .ccp -

        p_TTCtrl = new CToolTipCtrl;
        ASSERT(p_TTCtrl->Create(this));

        CWnd* p_Wnd = this->GetDlgItem(IDCTL_Pref_CB_Exit);

        VERIFY(p_TTCtrl->AddTool(p_Wnd, IDCTL_Pref_CB_Exit, NULL, 0));
        p_TTCtrl->Activate(TRUE);

        When I run the debugger, there are no ASSERT or Verify errors. If I hover over IDCtrl_Pref_CB which is a checkbox created from the .rc file, nothing happens. Can someone please point out what I am missing or have wrong. Thanks, Barry

        V Offline
        V Offline
        Vaclav_
        wrote on last edited by
        #3

        In an ancient VC6.0 there is a "add C++ components " option which does the grunt work of adding tooltip for you. I would guess that the latest VS has a similar tool.

        B 1 Reply Last reply
        0
        • V Vaclav_

          In an ancient VC6.0 there is a "add C++ components " option which does the grunt work of adding tooltip for you. I would guess that the latest VS has a similar tool.

          B Offline
          B Offline
          BarryPearlman
          wrote on last edited by
          #4

          I found it. I was creating the CMFCTooltipCtrl class improperly. Thanks for the effort, Barry

          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