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. listview with tooltip

listview with tooltip

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

    hello, I found out that listview has tooltip (duaaaaaa) http://blogs.msdn.com/b/alexdan/archive/2006/05/16/adding-tooltips-to-a-list-view-control.aspx[^] but how in the world it works? my listview is ONWERDRAW and extended styles lVS_EX_INFOTIP | LVS_EX_LABLETIP, I have been told that I will get an LVN_GETINFOTIP notification, which i do not get it at all, my questions are (Did i miss something?) and (How that tooltip works? I mean does it work when i leave the arrow of item or what?) there are some articles but they did not explain that working with API and C++ nothing else thank

    L 1 Reply Last reply
    0
    • J JoneLe86

      hello, I found out that listview has tooltip (duaaaaaa) http://blogs.msdn.com/b/alexdan/archive/2006/05/16/adding-tooltips-to-a-list-view-control.aspx[^] but how in the world it works? my listview is ONWERDRAW and extended styles lVS_EX_INFOTIP | LVS_EX_LABLETIP, I have been told that I will get an LVN_GETINFOTIP notification, which i do not get it at all, my questions are (Did i miss something?) and (How that tooltip works? I mean does it work when i leave the arrow of item or what?) there are some articles but they did not explain that working with API and C++ nothing else thank

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

      A quick look at the documentation shows where the author got this wrong. When you receive the notification you need to set the tooltip text into the buffer as follows:

      // this is where the tooltip text is set
      sprintf_s(pGetInfoTip->pszText, pGetInfoTip->cchTextMax, "Some helpful tooltip");

      Note, this is an over-simplification, and you should check the documentation to ensure you are following the rules.

      Veni, vidi, abiit domum

      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