|
While creating list view just add this LVS_SHOWSELALWAYS to Windows Style
hWndListView = CreateWindow(WC_LISTVIEW,
"",
WS_CHILD | LVS_REPORT | LVS_EDITLABELS | LVS_SHOWSELALWAYS,
rectClient.left,
rectClient.top,
rectClient.right - rectClient.left,
rectClient.bottom - rectClient.top,
hWnd,
(HMENU)ID_LIST,
hInst,
NULL);
If you want to get the inxed on the selected List view then use this
int selecteditem = SendMessage(hWndLV, LVM_GETNEXTITEM, -1, MAKELPARAM (LVNI_SELECTED, 0));
|
|