Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Menu bar bug
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Menu bar bug

 Post Reply Post Reply
Author
Message
rwfearnley View Drop Down
Groupie
Groupie
Avatar

Joined: 21 January 2004
Location: United Kingdom
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote rwfearnley Quote  Post ReplyReply Direct Link To This Post Topic: Menu bar bug
    Posted: 21 January 2004 at 9:38am

XTreme Toolkit 4.1 bug:

If you run your MDI application (e.g. GUI_VisualStudio demo) and, before opening the Window menu, the application receives a WM_SETTINGCHANGE message (e.g. change the Regional Option in the control panel) the CXTMenuBar control looses its handle to the Window menu. If you then open the Window menu it fails to add the MDI child window list to the pop up menu.

This is caused by a bug in CXTMenuBar::OnSettingChange (XTMenuBar.cpp)

the line:

 LoadMenu(m_hMenu, m_hMenuDefault);

should read:

 LoadMenu(m_hMenu, m_hMenuShared);

When the original line is executed the member variable m_hMenuShared gets set to m_hMenuDefault. Then when CXTMenuBar::OnInitWindowMenu is executed when the Window menu is selected it updates the wrong menu, so the Window menu is not updated.

In our case we switch menus when views are changed and we also send WM_SETTINGCHANGE internally when various settings are changed. This means the problem happens more frequently.

To reproduce:
1. Open an MDI application with a menu bar (e.g. GUI_VisualStudio demo)
2. Change the Regional Option in the Control Panel
3. Open the Window menu - the MDI window list is missing



Edited by rwfearnley
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.