CTreeView tab key beeping problem
Posted on 1999-11-22
I have a class derived from CTreeView, and I want the user to be able to use the tab key and shift-tab to perform actions. My class has an OnKeyDown function responding to a TVN_KEYDOWN message. I have two problems:
1. When the tab key is pressed, the application executes the code in the OnKeyDown switch statement properly, but then it beeps (apparently the default behavior for an undefined key in CTreeCtrl). Setting *pResult to TRUE has no effect.
2. I don't see any way to distinguish between the tab key and the shift-tab key. They both return the same key codes.
I have tried using a function responding to WM_KEYDOWN instead of TVN_KEYDOWN, but the problems are the same. Any help is appreciated.