Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - BUG in Handling of mnemonic chars in menu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

BUG in Handling of mnemonic chars in menu

 Post Reply Post Reply
Author
Message
ivpa View Drop Down
Newbie
Newbie


Joined: 28 February 2012
Status: Offline
Points: 13
Post Options Post Options   Thanks (1) Thanks(1)   Quote ivpa Quote  Post ReplyReply Direct Link To This Post Topic: BUG in Handling of mnemonic chars in menu
    Posted: 23 July 2012 at 11:12am
Hi All, 
I have found a small bug in handling of skinned menus.

The mnemonic characters did not work with custom menus. 
So e.g. for menu "File" do not work combination ALT+F, S
The key ALT+F will open (popup) menu, but the reaction on pressing e.g. "S" is lost. 

In Version 15.2.1  should be fixed function CXTPSkinPopupMenuState::OnChar(...) in file XTPSkinObjectMenu.cpp. 

There in handling of case MNC_SELECT should be corrected range of valid menu items 
to interval <0,pPopuMenu->GetCount() ).
 
So simple, there should be changed wrong condition 
    from : 
         if (nItem < 0 || nItem < pPopupMenu->GetCount())
    to :   
         if (nItem < 0 || nItem >= pPopupMenu->GetCount())

I did not checked if recent version 15.3.1 has the same bug or not. 

With best regards,
Ivan

Back to Top
Insad View Drop Down
Groupie
Groupie
Avatar

Joined: 28 October 2004
Location: The Netherlands
Status: Offline
Points: 55
Post Options Post Options   Thanks (0) Thanks(0)   Quote Insad Quote  Post ReplyReply Direct Link To This Post Posted: 30 July 2013 at 10:40am
Sorry for bumping this post, but might it be possible that someone at CodeJock puts this on a todo list?
 
Even in TKP 16.2.3 this isn't fixed yet. So I guess it was lost in the stack of other issues Wink
 
I've tested the solution and it does fix the problem for me too.
 
It's a small change and even a simple guy can see what's wrong in the original code Clap
 
It is appreciated if this change can find its way to the next release, since I need to change this by hand everytime a release comes out Cry
 
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
Back to Top
ivpa View Drop Down
Newbie
Newbie


Joined: 28 February 2012
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote ivpa Quote  Post ReplyReply Direct Link To This Post Posted: 12 August 2013 at 1:45pm
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.