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