Switching Windows with Keypad Numbers |
Post Reply |
Author | |
mrmathis
Senior Member Joined: 17 May 2007 Location: United States Status: Offline Points: 105 |
Post Options
Thanks(0)
Posted: 08 May 2008 at 6:02pm |
In 11.2.0 and 11.2.1, I can't switch windows in my MDI ribbon app using the numbers on the keypad. That is, create a few windows, then hit Alt-V-S-enter then 0 or 1 or 2. The numbers above the keyboard work fine. This fails in the RibbonMDISample as well. It just dings at me. However, the samples work in 11.2.2 and 12.0.
What's the difference? Was it a bug or did the sample change the way it does something? Is there anything I can do in 11.2.0 to make this work?
|
|
--Mike
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
try add these lines in sources:
BOOL CXTPShortcutManager::CompareAccelKey(TCHAR chAccel, UINT wParam)
{ if (wParam >= VK_NUMPAD0 && wParam <= VK_NUMPAD9) return (UINT)chAccel == (wParam + '0' - VK_NUMPAD0); ... |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
mrmathis
Senior Member Joined: 17 May 2007 Location: United States Status: Offline Points: 105 |
Post Options
Thanks(0)
|
I tried that and am seeing crashes - if not on the first call, then on the second. The call to CXTPShortcutManager::CompareAccelKey appears to being doing what is expected of it. However, a few lines after it returns to CXTPCommandBar::OnKeyboardTipChar I get the crash in the call to OnKeyboardTip. At that point, pTip->m_pOwner usually points to freed memory (0xfeeefeee).
The stack is
CObject::IsKindOf(0x070e17d4) C++
AfxDynamicDownCast(0x070e17d4, 0x20fc7728) C++ CXTPCommandBar::OnKeyboardTip(0x20fc5c78) C++ CXTPCommandBar::OnKeyboardTipChar(0x00000062) C++ CXTPCommandBar::OnHookKeyDown(0x00000062, 0x00500001) C++ CXTPPopupBar::OnHookKeyDown(0x00000062, 0x00500001) C++ CXTPCommandBar::OnHookMessage(0x00000000, 0x00000100, 0x00000062, 0x00500001, 0x00000000) C++ CXTPKeyboardManager::ProcessKeyboardHooks(0x00000100, 0x00000062, 0x00500001) C++ CXTPKeyboardManager::KeyboardProc(0x00000000, 0x00000062, 0x00500001) C++ I've tried debugging it to see how pOwner is going bad, but with breakpoints in place, the crash goes away. I tried making the breakpoints conditional on the owner data looking wacky [eg (*((*pTip).m_pOwner)).m_dwRef < 0 || (*((*pTip).m_pOwner)).m_dwRef > 100]. Sometimes they fire, but other times I crash without the breakpoints firing. In those cases the data doesn't look freed, but since I'm crashing something must be bad.
Any thoughts?
|
|
--Mike
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Download 12.0 release.
|
|
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 |