When the user clicks on an item in a ListView table, how can I disable the UP and DOWN keys? I have them doing nothing, but I want the highlighted item not to move until the user clicks on another item. I think you set a flag in WM_KEYUP and WM_KEYDOWN in WndProc to say do nothing, but not sure what to set.
This doesn't work, but I think this is the same as not having a WM_KEYDOWN statement. ListView, upon creation, has the 2 arrows UP and DOWN activated by default. Just trying to deactivate them or do nothing when pressed. They currently move up and down the list of items. I don't want that.
Apparently, the only way to reset all the controls within a ListView back to the default (which is unselectable) is to use EnableWindow(hwnd,FALSE), then EnableWindow(hwnd,TRUE). This allows the scroll bar to be active to scroll thru the list, but not be able to do anything else. If you use ListView_SetExtendedListViewStyle to allow row clicks, there is no way that I have found to revert back to no row clicks allowed (but still allow scrolling) except by disabling the window and reenabling it again. I've tried capturing mouse clicks and key strokes with the window enabled, but nothing has every worked.