Print Page | Close Window

Menu bar bug

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=374
Printed Date: 10 May 2024 at 2:07pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Menu bar bug
Posted By: rwfearnley
Subject: Menu bar bug
Date 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




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