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. CListView SetInfoTip

CListView SetInfoTip

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

    I'm trying to set up info tips for different subitems in a CListView in Report mode. I can catch the LVN_GETINFOTIP when you hover over subitem 0, and correctly display the text I want. But hovering over any other subitem doesn't produce the notify. It would seem that the method CListView::SetInfoTip might do what I want, but it fails (returns false) when I invoke it, and I have no idea why. I have an application manifest, and I am using version 6 of ComClt32.dll. I've set the extended style to include LVS_EX_INFOTIP. I'd like to get this API working. Alternatively, if there's some way to get the LVN_GETINFOTIP notify when hovering over a different sub-item, that would do it too. thanks, Stache

    A 1 Reply Last reply
    0
    • S Stache

      I'm trying to set up info tips for different subitems in a CListView in Report mode. I can catch the LVN_GETINFOTIP when you hover over subitem 0, and correctly display the text I want. But hovering over any other subitem doesn't produce the notify. It would seem that the method CListView::SetInfoTip might do what I want, but it fails (returns false) when I invoke it, and I have no idea why. I have an application manifest, and I am using version 6 of ComClt32.dll. I've set the extended style to include LVS_EX_INFOTIP. I'd like to get this API working. Alternatively, if there's some way to get the LVN_GETINFOTIP notify when hovering over a different sub-item, that would do it too. thanks, Stache

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      The docs say that LVN_GETINFOTIP is only generated for the first item. As for SetInfoTip, make sure that you are using a wide string. I had the same problem only to find out later that I was passing a ANSI string when it expected a wide string. -Atul, Sky Software http://www.ssware.com Shell MegaPack For ActiveX & .Net - Windows Explorer Like Shell UI Controls

      S 1 Reply Last reply
      0
      • A Anonymous

        The docs say that LVN_GETINFOTIP is only generated for the first item. As for SetInfoTip, make sure that you are using a wide string. I had the same problem only to find out later that I was passing a ANSI string when it expected a wide string. -Atul, Sky Software http://www.ssware.com Shell MegaPack For ActiveX & .Net - Windows Explorer Like Shell UI Controls

        S Offline
        S Offline
        Stache
        wrote on last edited by
        #3

        Ok, I think I've done all the manifest stuff correctly. DLLGetVersion on "comctl32.dll" reports Major Version 6, Minor Version 0, Build 2900, Platform 2. Here's the actual code fragment, since at this point, I think I must be missing something blindingly obvious: LVSETINFOTIP sit; sit.cbSize = sizeof( sit ); sit.dwFlags = 0; sit.iItem = 1; sit.iSubItem = 1; sit.pszText = L"fake primary info tip"; // This works, so we know item 1 is there. CString str = m_ListCtrl.GetItemText( 1, 1 ); // This always returns false, and no info tip appears. BOOL bResult = m_ListCtrl.SetInfoTip( & sit ); The extended style includes LVS_EX_INFOTIP and LVS_EX_LABELTIP, and I've tried either, both or none with no difference in results. Any insight would be greatly appreciated! thanks, Stache

        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