Hot key handling fails in view when using a Ribbon |
Post Reply |
Author | |
Insad
Groupie Joined: 28 October 2004 Location: The Netherlands Status: Offline Points: 55 |
Post Options
Thanks(0)
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 |
|
BobC
Groupie Joined: 28 April 2017 Location: Longmont, CO Status: Offline Points: 55 |
Post Options
Thanks(0)
|
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.
|
|
Insad
Groupie Joined: 28 October 2004 Location: The Netherlands Status: Offline Points: 55 |
Post Options
Thanks(0)
|
Still no response
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 |
|
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 |