diff --git a/win/win32/mhmenu.c b/win/win32/mhmenu.c index 58f2ae62f..5bcb1f1b6 100644 --- a/win/win32/mhmenu.c +++ b/win/win32/mhmenu.c @@ -9,6 +9,7 @@ #include "mhmain.h" #include "mhmsg.h" #include "mhfont.h" +#include "mhdlg.h" #define MENU_MARGIN 0 #define NHMENU_STR_SIZE BUFSZ @@ -1038,7 +1039,10 @@ BOOL onListChar(HWND hWnd, HWND hwndList, WORD ch) char buf[BUFSZ]; reset_menu_count(hwndList, data); - mswin_getlin("Search for:", buf); + if( mswin_getlin_window("Search for:", buf, BUFSZ)==IDCANCEL ) { + strcpy(buf, "\033"); + } + SetFocus(hwndList); // set focus back to the list control if (!*buf || *buf == '\033') return -2; for(i=0; imenu.size; i++ ) { if( NHMENU_IS_SELECTABLE(data->menu.items[i]) diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index f08404e64..724ad0f84 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -882,11 +882,6 @@ void mswin_destroy_nhwindow(winid wid) return; } - if (GetNHApp()->windowlist[wid].type == NHW_TEXT) { - /* this type takes care of themself */ - return; - } - if (wid != -1) { if( !GetNHApp()->windowlist[wid].dead && GetNHApp()->windowlist[wid].win != NULL )