Handling Keyboard input.... |
Post Reply |
Author | |
Kevin6
Groupie Joined: 13 May 2005 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
Posted: 19 September 2005 at 4:39am |
Dear All, I want to be able to have my control expand and collapse its contents on the key press by the user. Cntrl A and Cntrl D. This is working fine if the CXTPPropertyGridView is collapsed as the top level window is getting the messages. Once the contents of the CXTPPropertyGridView control are expanded it no longer gets the messages co-herently. It seems that all keyboard events are not directed to the CXTPPropertyGridView. Other than subclassing - can anyone suggest a reasonable solution for catching keyboard events? (Specifically - can I re-wire keyboard events to the parent class?) regards Richard.
|
|
Kevin.
|
|
Kevin6
Groupie Joined: 13 May 2005 Location: United Kingdom Status: Offline Points: 30 |
Post Options
Thanks(0)
|
Well....as this forum was SO budding with ideas - I thought I would post back the result. Subclassing the control didn't work as my code for expanding and collapsing the grid contents were held at the pane level. The easiest solution was to track all keyboard presses that were handled by the Pane and then instruct the grid to Expand or Contract. Using PreTranslate Message seems really robust... WM_CHAR was useless - OnCharToItem sort of worked (Expanded the grid but then when it lost focus you couldn't Collapse it).... Rich |
|
Kevin.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |