fix for Bugzilla entry 900 by mrnobo1024 at yahoo.com: don't destroy menus when switching between normal and scientific mode

svn path=/trunk/; revision=18518
This commit is contained in:
Martin Fuchs 2005-10-17 12:58:07 +00:00
parent 5afb16c749
commit 48d2f86ba2
2 changed files with 8 additions and 3 deletions

View file

@ -269,6 +269,7 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
}
DestroyCalc( &calc );
DestroyMenus();
PostQuitMessage( 0 );
return 0;
@ -2839,6 +2840,12 @@ void DestroyCalc (CALC *calc)
{
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 @@ void DestroyCalc (CALC *calc)
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) {

View file

@ -338,6 +338,7 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
void InitLuts(void);
void InitMenus(HINSTANCE hInst);
void DestroyMenus();
void InitCalc (CALC *calc);
void DestroyCalc (CALC *calc);