是什么地方设置不对吗?

解决方案 »

  1.   

    ListView_GetSubItemRect 是什么?是不是自己写的函数?
      

  2.   

    1) 自定义窗体类函数,要在窗体类的 private、public、protected 声明。定义时必须 Form.ListView_Get...
    2) 自定义非窗体类函数,在窗体类外声明。
      

  3.   

    ListView_GetSubItemRect为自定义函数或变量,现在delphi发现他不见了,
    所以告诉你它没有被声明。
      

  4.   

    谢谢楼上3位,我可能没说清楚。网上我看到有人这样用的。这个是msdn中的一个宏。
    ListView_GetSubItemRectBOOL ListView_GetSubItemRect(
        HWND hwndLV,
        int iItem,
        int iSubItem,
        int code,
        LPRECT lpRect
    );Retrieves information about the rectangle that surrounds a subitem in a list view control. You can use this macro (recommended) or send the LVM_GETSUBITEMRECT message explicitly. This macro is intended to be used only on list view controls that use the LVS_REPORT style. Returns nonzero if successful, or zero otherwise. 
    hwndLV 
    Handle to a list view control. 
    iItem 
    Index of the subitem's parent item. 
    iSubItem 
    The one-based index of the subitem. 
    code 
    Portion of the list view subitem for which to retrieve the bounding rectangle information. This value can be one of the following: LVIR_BOUNDS Returns the bounding rectangle of the entire item, including the icon and label. 
    LVIR_ICON Returns the bounding rectangle of the icon or small icon. 
    LVIR_LABEL Returns the bounding rectangle of the entire item, including the icon and label. This is identical to LVIR_BOUNDS. lpRect 
    Address of aRECT structure that receives the subitem bounding rectangle information. 
    Version 4.70 
      

  5.   

    http://blog.chinaunix.net/u/25096/showart_411278.html这里有对这个的引用。
      

  6.   

    delphi没有定义这个宏,你不能使用
      

  7.   

    uses
      CommCtrl;CommCtrl是TListView与TTreeView的基本库。
      

  8.   

    先定义一个TListView对象
    ListView来自哪个unit要写好,像7楼就告诉你了,否则识别不了
    在使用TListView的方法,如果是类方法,就不需要对象引用,直接类调用就行,否则就得对象引用