Menus do not handle keyboard
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=798
Printed Date: 24 December 2024 at 7:58pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Menus do not handle keyboard
Posted By: bobeobi
Subject: Menus do not handle keyboard
Date Posted: 31 May 2004 at 4:36am
I use accelerators in my view (CCrystalTextView-based code, see codeguru)
MyView::PretranslateMessage(...)
{
...
if(TranslateAccel(..)) // I can't determine, if main menu is active here... :(((
return TRUE;
...
}
When this view is active, and I select main menu (created using CommandBars), menu doesn't
handle keyboard messages correctly(e.g. down or up key), because view grabs this message in it's PreTranslate.
Can I determine, that menus are being tracked? If I Could, i would test this flag in my view's PreTranslate code.
|
Replies:
Posted By: Oleg
Date Posted: 01 June 2004 at 3:34am
f.e XTPMouseManager()->IsMouseLocked() returns TRUE.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: bobeobi
Date Posted: 01 June 2004 at 4:38am
Doesn't work.
I popped up context menu via commandbar's TrackContextMenu, and while
menu was visible, U pressed down key,that caused PreTranslate in view
to be called. I called IsMouseLocked() within Pretranslate code. it
returned FALSE.
But thanks any way. MouseManager has method IsTrackedLock(NULL), which handled the issue ;)
|
Posted By: Oleg
Date Posted: 03 June 2004 at 12:44am
Oh, yeah, I mean IsTrackedLock :)
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: gteet
Date Posted: 03 June 2004 at 11:46am
It's nice that you have a workaround for this issue, but is there any chance the library can be modified so keystrokes don't get to the view when a menu is visible?
|
Posted By: Oleg
Date Posted: 08 June 2004 at 3:15am
In next version it will be available.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
|