Forum Discussion

rajendra_gokhal's avatar
rajendra_gokhal
New Contributor
12 years ago

How to get values in the ListView control?

I have an application developed in MFC.

The ListView control and the individual list items are identified.

However the data in the individual list item cannot be accessed.

I tried using the 'wItem' property and entered the 'Item' & 'SubItem' values.

I am using TestComplete 7.52. The screen shot is attached.

Still it does not display the contents. Please help.

3 Replies

  • aqAnt's avatar
    aqAnt
    SmartBear Alumni (Retired)

    Hello Rajendra,


    Do you get any errors when you access the wItem property of your control? Do other TestComplete's wrapper properties return correct values? How does the latest version of TestComplete recognize the control?

  • No. I do not get any errors while accessing the wItem property.

    I selected the Type as 'Integer' and entered the Item & SubItem values.

    I am attaching the object spy details here.



    I tried the application compilation options as well given in the below link but it still does not show the value.



    http://support.smartbear.com/viewarticle/27298/

  • Hello Rajendra,





    Thank you for the screenshots.





    In general, TestComplete sends the LVM_GETITEMTEXT message to get the wItem property's values. The fact that the values are empty and there are no errors indicates two things: the list view control is owner-drawn and your developers do not store item data in the control (they use another storage instead). Thus, as TestComplete doesn't know how to access the item data, you need to use other features, and, as I know, you've made a success with them.