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++ mailto:user32.dll!_DispatchHookA@16 - user32.dll!_DispatchHookA@16 () + 0x56 bytes mailto:user32.dll!_CallHookWithSEH@16 - user32.dll!_CallHookWithSEH@16 () + 0x21 bytes mailto:user32.dll!___fnHkINDWORD@4 - user32.dll!___fnHkINDWORD@4 () + 0x28 bytes mailto:ntdll.dll!_KiUserCallbackDispatcher@12 - ntdll.dll!_KiUserCallbackDispatcher@12 () + 0x2e bytes mailto:user32.dll!_DispatchHookA@16 - user32.dll!_DispatchHookA@16 ()
|