fix for Bugzilla entry 900 by mrnobo1024 at
yahoo.com: don't destroy
menus when switching between normal and scientific mode
Modified: trunk/reactos/subsys/system/calc/winecalc.c
Modified: trunk/reactos/subsys/system/calc/winecalc.h
_____
Modified: trunk/reactos/subsys/system/calc/winecalc.c
--- trunk/reactos/subsys/system/calc/winecalc.c 2005-10-17 12:44:16 UTC
(rev 18517)
+++ trunk/reactos/subsys/system/calc/winecalc.c 2005-10-17 12:58:07 UTC
(rev 18518)
@@ -269,6 +269,7 @@
}
DestroyCalc( &calc );
+ DestroyMenus();
PostQuitMessage( 0 );
return 0;
@@ -2839,6 +2840,12 @@
{
int i;
+ for (i=0;i<calc->numButtons;i++)
+ DestroyWindow(calc->cb[i].hBtn);
+}
+
+void DestroyMenus()
+{
if (menus[MENU_STD] != 0)
DestroyMenu(menus[MENU_STD]);
@@ -2847,9 +2854,6 @@
if (menus[MENU_SCIWS] != 0)
DestroyMenu(menus[MENU_SCIWS]);
-
- for (i=0;i<calc->numButtons;i++)
- DestroyWindow(calc->cb[i].hBtn);
}
void calc_buffer_format(CALC *calc) {
_____
Modified: trunk/reactos/subsys/system/calc/winecalc.h
--- trunk/reactos/subsys/system/calc/winecalc.h 2005-10-17 12:44:16 UTC
(rev 18517)
+++ trunk/reactos/subsys/system/calc/winecalc.h 2005-10-17 12:58:07 UTC
(rev 18518)
@@ -338,6 +338,7 @@
void InitLuts(void);
void InitMenus(HINSTANCE hInst);
+void DestroyMenus();
void InitCalc (CALC *calc);
void DestroyCalc (CALC *calc);