What would I do to know which item in a List-view control is selected. I have it with icons, but I want to know which one is selected when the user clicks a button.
What would I do to know which item in a List-view control is selected. I have it with icons, but I want to know which one is selected when the user clicks a button.
Website(s): http://www16.brinkster.com/trifaze/
E-mail: [email protected]
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK
this code will get the first item in the list view that has been selected:
hope that helps!Code:SendMessage(hWndListView, LVM_GETNEXTITEM, (WPARAM)-1, MAKELPARAM((UINT)LVNI_SELECTED, 0));
U.
Quidquid latine dictum sit, altum sonatur.
Whatever is said in Latin sounds profound.
Or even
iIndex=ListView_GetSelectionMark(hwndListView);
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
yeah.. was going to paste that too.. but that's just a macro, and it's handy to know what's going on behind the scenes
good one though nova.
U.
Quidquid latine dictum sit, altum sonatur.
Whatever is said in Latin sounds profound.