I have inserted a few items in the List Control and provided functionality to move the items up and down the list by press of 2 buttons. I want these button to be enabled or disabled when i select an item using mouse or go through the list using the arrow keys, using the following rules:
1. If the first items is currently selected, only UP button should be disabled.
2. If the last item is currently selected, only DOWN button should be disabled.
3. Otherwise both the buttons should be enabled
Can any one tell me how to do this. I tried with NM_CLICK event on List control, it works on mouse clicks. But every time i have to click the specifed item. If use the arrow keys, there is no change in the buttons.
Thanks in advance
raochetan
1. If the first items is currently selected, only UP button should be disabled.
2. If the last item is currently selected, only DOWN button should be disabled.
3. Otherwise both the buttons should be enabled
Can any one tell me how to do this. I tried with NM_CLICK event on List control, it works on mouse clicks. But every time i have to click the specifed item. If use the arrow keys, there is no change in the buttons.
Thanks in advance
raochetan