suvidhshetty_1
13 years agoOccasional Contributor
To know check box is checked or not of extended style of "ListViewWndClass"
Hi,
I am not able to verify if the check box is checked or not for 'ListViewWndClass' the Extended style(Check box) of this class is not supported in TestComplete.
The below code I have used it for checkboxes in "SysListView32" and it works as expected.
But for 'ListViewWndClass' the variable 'nPos' in Object_ShiftRight() method is not populated with the correct value it depends on what "Win32API.SendMessage(guiObject.Handle, LVM_GETITEMSTATE, nItemID, LVIS_STATEIMAGEMASK)"sends and it is '0'.
LVM_GETITEMSTATE = 4140
LVIS_STATEIMAGEMASK = &HF000
nShiftVal = Object_ShiftRight(Win32API.SendMessage(guiObject.Handle, LVM_GETITEMSTATE, nItemID, LVIS_STATEIMAGEMASK), 12)
Public Function Object_ShiftRight(nPos, nShift)
Dim nPostShift
nPostShift = nPos \ (2 ^ nShift)
If (nPos mod (2 ^ nShift) <> 0) And (nPos < 0) Then
nPostShift = nPostShift - 1
End If
Object_ShiftRight = nPostShift
End Function
I guess we have different MASK values for "ListViewWndClass" object
.Please help me to resolve this issue.
Thanks,
Suvidh Shetty