Print Page | Close Window

OnMenuChar not getting called

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=19462
Printed Date: 22 November 2024 at 7:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: OnMenuChar not getting called
Posted By: tserface
Subject: OnMenuChar not getting called
Date Posted: 03 February 2012 at 12:01pm
I submitted this problem to support a few months ago and haven't heard anything back so I figured I'd ask here if anyone has seen this problem before I go in and fix it myself.  I use this call to get accelerator keys from child dialogs that are embedded on a main dialog (when the child has focus).  It works fine when skinning is off, but never gets called when skinning is on.  Here's the text of my support message:

SUPPORT REQUEST:

If I load one of the skins from a .cjsytles file then the message WM_MENUCHAR is no longer sent to my windows.  If I just comment out loading the skin then the message starts coming again.  I couldn''t find anything in your source where OnMenuChar is being handled, but there is something going on with WM_MENUCHAR around line 2632 in XTPSkinObjectMenu.cpp.  This message is supposed to come whenever anyone presses Alt+another key on a dialog OR if they press a key that is not on a current menu.

There are some changes in that file for the latest version, but nothing that looks like it has anything to do with this problem so I don''t want to go to the trouble of updating unless I know this problem is fixed.  I couldn''t find anything about it in the forums.

This link describes the expected behavior of this message:

http://msdn.microsoft.com/en-us/library/cd5xeb57%28v=vs.80%29.aspx - http://msdn.microsoft.com/en-us/library/cd5xeb57(v=vs.80).aspx

It''s easy to reproduce this with your code using the SDI Skin program:

1. Add an OnMenuChar() handler to mainframe.  I just used the wizard from ClassView.

2. Set a break point in the added handler routine.  It just calls the base class by default.

3. Click on the view on the right of the splitter.

4. Try press Alt+M (something that is not defined) and notice it does nothing.

5. Quit the program and add a return at the beginning of LoadSkin() in mainframe which just causes it to not load the skin.

6. Try again and notice that now your break point is hit.

Thanks,

Tom 




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