![]() |
Keyboard navigation problems |
Post Reply ![]() |
Author | |
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 899 |
![]() ![]() ![]() ![]() ![]() Posted: 14 May 2008 at 10:32am |
When I click on a popup button on the command bar ribbon and use the arrow keys to navigate the menu, the popup window does not consume the keystrokes.
This causes the application to also see the arrow keys and the result is the arrow key strokes are processed twice by the popup window (correct) but not by the application too (incorrect).
It looks like the problem is related to the "hook" procedures CJ uses. CJ is hooking into the keyboard events and processing certain keystrokes without removing the events from the event queue.
How can I force the CJ control to not allow the message to be passed onto the application once CJ decides the keystroke is meant for its control?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Do you see same with any our sample ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 899 |
![]() ![]() ![]() ![]() ![]() |
Which sample do you have that reacts to the arrow keys?
Are you processing windows messages the normal way or are you using windows hooks to get the keystrokes and process them while allowing the events to proceed to the app where the events are processed using WindowProc procedures?
|
|
![]() |
|
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 899 |
![]() ![]() ![]() ![]() ![]() |
Oleg,
The "menu" is processing the arrows because CXTPKeyboardManager::SetupKeyboardHook has called SetWindowsHookEx.
When using a windows hook to access messages in an application, the application itself will still receive all the messages the hook receives.
In our application, the arrow keys are used to manipulate our view orientations. When we click on one of your popup buttons or any item that uses the arrow keys (e.g., galleries that have scroll bars) and then use the arrow keys, I see you hook routine getting called and it sends the key events (eventually) to the popup to navigate the user's selection.
After calling the hook, Windows then proceeds to process the message the normal way so the message makes it to our WindowProc and we process the keystroke too.
This is becoming a major issue in our application. Here is a sample of the call stack that shows me just why the archetecture of CJ is causing us these problems:
> ToolkitPro1120vc80D.dll!CXTPCommandBar::OnHookKeyDown(unsigned int nChar=0x00000028, long lParam=0x01500001) Line 949 C++
ToolkitPro1120vc80D.dll!CXTPPopupBar::OnHookKeyDown(unsigned int nChar=0x00000028, long lParam=0x01500001) Line 1640 C++ ToolkitPro1120vc80D.dll!CXTPCommandBar::OnHookMessage(HWND__ * __formal=0x00000000, unsigned int nMessage=0x00000100, unsigned int & wParam=0x00000028, long & lParam=0x01500001, HWND__ * __formal=0x00000000) Line 1151 + 0x22 bytes C++ ToolkitPro1120vc80D.dll!CXTPKeyboardManager::ProcessKeyboardHooks(unsigned int nMessage=0x00000100, unsigned int wParam=0x00000028, long lParam=0x01500001) Line 391 + 0x21 bytes C++ ToolkitPro1120vc80D.dll!CXTPKeyboardManager::KeyboardProc(int code=0x00000000, unsigned int wParam=0x00000028, long lParam=0x01500001) Line 433 + 0x15 bytes C++ user32.dll!_DispatchHookA@16() + 0x56 bytes user32.dll!_CallHookWithSEH@16() + 0x21 bytes user32.dll!___fnHkINDWORD@4() + 0x28 bytes ntdll.dll!_KiUserCallbackDispatcher@12() + 0x2e bytes user32.dll!_DispatchHookA@16() |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
I don't understand.
Do you see same problem in our RibbonSample. Do you see RTF text handle arrows with Menus?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
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 |