You are doing it wrong. You don't pass a pointer to
LVITEM
structure which is needed to receive the information on the item. Instead, you cast the function result, which merely returns TRUE or FALSE, indicating success or failure, but never a pointer as you incorrectly assumed.
Please see:
LVM_GETITEM message (Windows)[
^],
https://msdn.microsoft.com/en-us/library/windows/desktop/bb774760(v=vs.85).aspx[
^].
Besides, I'm not sure you correctly use
SendDlgItemMessage
; you can choose between this function or
SendMessage
. This is explained here:
https://support.microsoft.com/en-us/kb/12273[
^].
Alternatively, you can use the macro
ListView_GetItem
:
ListView_GetItem macro (Windows)[
^].
—SA