Print Page | Close Window

Hot key handling fails in view when using a Ribbon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=23309
Printed Date: 23 December 2024 at 10:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Hot key handling fails in view when using a Ribbon
Posted By: Insad
Subject: Hot key handling fails in view when using a Ribbon
Date Posted: 06 April 2017 at 10:18am
The following was created as a support ticket on March 22, 2017.
Until now, even after sending some mail to support@codejock.com, nobody at CodeJock support seemed to bother to look at the ticket (Issue# 35721) or even answer my email.
Therefor I submit the same here, hoping to get an answer within the two weeks I'm already waiting..

Take the sample from the TKP: Samples\Ribbon\RibbonMDISample
Replace the CRichEditView with a CXTResizeFormView and put two buttons on that view.
Button 1 has the caption '&File button' and button 2 has the caption '&Weird or what'.
Add a button click handler to both buttons and just show a messagebox in the handler.

Now when run the application and set the focus to the view (check by using the tab key to see that one of the buttons has the focus).
Now press Alt-W and notice that the handler for button 2 is executed.
When pressing Alt-F the expected result would be that the handler for button 1 is executed.
Instead of that, the ribbonbar selects the File menu.

This means that the ribbonbar gets the preference over the active view! Which, TMHO, is a bug :(

In our application the problem is even worse because the view runs on another thread an in that case both handlers are executed: First the ribbonbar, which sets the thread state to the ribbonbar, and then the one in my view. This is a road to disaster because the thread state is not reset, meaning that the event-handler for the view is executed in the wrong thread state!

Can you please advise on how to fix this as soon as possible. When the sample works I think I can get it to work in our application as well, but the default behavior is already wrong..

Some more info on how I have tested the issue:
TKP versions tested: 16.4.0, 17.2.0 and 17.3.0 (all reproduce the issue)
VC versions tested: VS2013 and VS2015
Tested TKP as DLL and statically linked, NON-unicode



-------------
Products in use: XTP version 13.4.2/15.3.1/16.4.0/17.3.0
Platforms: Win2003(R2)/Win2008(R2)/Win7/Win2011/Win8(.1)/Win2012(R2)/Win10 (x86/x64)
Langs: VC++ (MFC) 6/2005/2008/2013/2015/2017



Replies:
Posted By: BobC
Date Posted: 28 April 2017 at 6:25pm
Not sure I would classify this as a bug in Codejock since Alt-F is a pre-defined hotkey in Windows.

Since CXTPResizeFormView is derived from CView, I can think of two approaches that might solve your problem: 1) derive your own class from CXTPResizeFormView and override PreTranslateMessage, or  2) derive and add an OnChildNotify handler.


Posted By: Insad
Date Posted: 01 June 2017 at 10:39am
Still no response Cry

I know you guys are busy with the v18 of TKP, but can someone please be so kind to respond to a ticket created on March 22..

That's more than 2 months without anyone from support watching?

Best regards,

Insad



-------------
Products in use: XTP version 13.4.2/15.3.1/16.4.0/17.3.0
Platforms: Win2003(R2)/Win2008(R2)/Win7/Win2011/Win8(.1)/Win2012(R2)/Win10 (x86/x64)
Langs: VC++ (MFC) 6/2005/2008/2013/2015/2017



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net