retreive text from listview item using API calls? 
Author Message
 retreive text from listview item using API calls?

I would like to know how to retreive text from listview item using API
calls.
I tried LVM_GETITEMTEXT, but VB returns an error or explorer cause an
illegal operation!
Can anyone tell me what i'm doing wrong please??

Private Type LVITEM
    mask As Long
    iItem As Long
    iSubItem As Long
    State As Long
    stateMask As Long
    pszText As String
    cchTextMax As Long
    iImage As Long
    lParam As Long
    iIndent As Long
End Type

Private Const LVM_FIRST As Long = &H1000
Private Const LVM_GETITEMTEXT As Long = (LVM_FIRST + 45)
Private Const LVM_GETCOLUMNORDERARRAY As Long = (LVM_FIRST + 59)
Private Const LVIF_TEXT As Long = &H1
Private Const LVM_GETTITEMCOUNT& = (&H1000 + 4)
Private Const LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55
-----------------------------------------------------------------------
        dim LV as LVITEM

        With LV
            .mask = LVIF_TEXT
            .iSubItem = 0
            .cchTextMax = 255
            .pszText = Space$(255)
        End With

        r = SendMessageAny(LV_Hwnd, LVM_GETITEMTEXT, idxItem, LV)
        strText = Left((LV.pszText), Len(LV.pszText) - 1)



Mon, 21 Jun 2004 14:17:50 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. retreive text from listview item using API calls?

2. retreive text from listview item using API calls.

3. retreive text from listview item using API

4. retreive text from listview item using API

5. Listview find item using API

6. Printing Grey Text using API Call

7. API for retreiving web username using IIS?

8. ListView Item Click called twice

9. HOWTO: Find ListView Item with API

10. ListView: How to get selected items via API ???

11. HOWTO: inserting items in a ListView ctrl with APIs

12. How to Add items to a Listview or Treeview with API

 

 
Powered by phpBB® Forum Software