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. ToolTip not working

ToolTip not working

Scheduled Pinned Locked Moved C / C++ / MFC
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.
  • P Offline
    P Offline
    Parthi_Appu
    wrote on last edited by
    #1

    Hi All, I have a class derived from CFormView. I have to show ToolTip for some buttons for the view drived from CFormView. I have done the below steps but, the tool tip is not showing... Say m_ToolTip is an object for CToolTipCtrl, In OnInitialUpdate()

    m_ToolTip.Create(this);
    m_ToolTip.Activate(TRUE);
    CRECT rect(1, 1, 1, 1);
    m_ToolTip.AddTool(this, "My Tool Tip", &rect, BTN_ID);

    In OnSize()

    m_ToolTip.SetToolRect(this, BTN_ID, &newRect);

    In PreTranslateMessage()

    if (pMSg->Message == /*Mouse Messages*/)
    m_ToolTip.RelayEvent(pMSG);

    Is there any thing to do more.. or i'm wrong in some where...

    Do your Duty and Don't expect the Result

    G 1 Reply Last reply
    0
    • P Parthi_Appu

      Hi All, I have a class derived from CFormView. I have to show ToolTip for some buttons for the view drived from CFormView. I have done the below steps but, the tool tip is not showing... Say m_ToolTip is an object for CToolTipCtrl, In OnInitialUpdate()

      m_ToolTip.Create(this);
      m_ToolTip.Activate(TRUE);
      CRECT rect(1, 1, 1, 1);
      m_ToolTip.AddTool(this, "My Tool Tip", &rect, BTN_ID);

      In OnSize()

      m_ToolTip.SetToolRect(this, BTN_ID, &newRect);

      In PreTranslateMessage()

      if (pMSg->Message == /*Mouse Messages*/)
      m_ToolTip.RelayEvent(pMSG);

      Is there any thing to do more.. or i'm wrong in some where...

      Do your Duty and Don't expect the Result

      G Offline
      G Offline
      Galatei
      wrote on last edited by
      #2

      AFAIK, you forgot to handle notifications (WN_NOTIFY) for the parent window of every control you have handle assigned to. Regards

      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