Print Page | Close Window

BUG in Handling of mnemonic chars in menu

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=19980
Printed Date: 26 April 2024 at 7:37pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: BUG in Handling of mnemonic chars in menu
Posted By: ivpa
Subject: BUG in Handling of mnemonic chars in menu
Date 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




Replies:
Posted By: Insad
Date 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


Posted By: ivpa
Date Posted: 12 August 2013 at 1:45pm
Seems that this has double here :
http://forum.codejock.com/forum_posts.asp?TID=21767&PID=71487#71487" rel="nofollow - http://forum.codejock.com/forum_posts.asp?TID=21767&PID=71487#71487



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