lapucca
asked on
How do I un-select and un-focus a listview control item?
Hi,
I have a C++ COM server code where I have a list control in a dialog. It's working fine in W2k server but in Win2003 it doesn't work right when I click to select other item it doesn't move the focus and select the new item. Now I have to code it so it will select it. I got the select part but how do I de-select and un-focus the currently selected item? Thanks.
To select and focus:
ListView_SetItemState(hwnd ListView, index, (LVIS_SELECTED | LVIS_FOCUSED), (LVIS_SELECTED | LVIS_FOCUSED) );
I have a C++ COM server code where I have a list control in a dialog. It's working fine in W2k server but in Win2003 it doesn't work right when I click to select other item it doesn't move the focus and select the new item. Now I have to code it so it will select it. I got the select part but how do I de-select and un-focus the currently selected item? Thanks.
To select and focus:
ListView_SetItemState(hwnd
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.