我想为listview中的每一个子项subitem都设置tooltip,使用了LVM_SETINFOTIP的消息,但是每次都执行失败?上网查了很多天,都没有找到原因,希望各位指导一下!!万分感谢!!!!!!
在stdafx.h中添加了:
#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
LVM_SETINFOTIP的调用是在我创建了listview,并且添加了子项之后的:

          LVSETINFOTIP setinfotip = {0}; setinfotip.cbSize = sizeof(LVSETINFOTIP);
setinfotip.dwFlags = 0;
setinfotip.iItem = 1;
setinfotip.iSubItem = 1; setinfotip.pszText = TEXT("test"); if(FALSE == SendMessage(hlistview, LVM_SETINFOTIP, 0, &setinfotip))
MessageBox(hwnd, TEXT("fail"), TEXT("fail"), MB_OK);
LVM_SETINFOTIP SDKlistview

解决方案 »

  1.   

    有一句:
    Note  To use this message, you must provide a manifest specifying Comclt32.dll version 6.0.
      

  2.   

    感谢 schlafenhamster 的回复,我已经在stdafx.h中指定了Comclt32.dll version 6.0:
    #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")这样也是可以的吧?
      

  3.   

    我的 vc6 要 资源里 加 
    类型 24
    ID 1
    manifest.bin"#pragma comment..." 会被 ignoredvc2005 以上又不用 管。
      

  4.   

    我用的是vs2008,后来我添加了mainfest文件,但是依然是无法使用LVM_SETINFOTIP,有点崩溃了,到底怎么为subitem添加tooltip呢?!