Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - OnMenuChar not getting called
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

OnMenuChar not getting called

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


Joined: 23 August 2011
Location: Oregon
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote tserface Quote  Post ReplyReply Direct Link To This Post Topic: OnMenuChar not getting called
    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(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 

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.141 seconds.