From f555ea44205fc7c9b82ee131164f6e89b6a49893 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 22 Oct 2005 11:31:03 +0000 Subject: [PATCH] clean-up on ok and cancel as well, not only close git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4349 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/LangDLL/LangDLL.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Contrib/LangDLL/LangDLL.c b/Contrib/LangDLL/LangDLL.c index f6cd96d9..b59286e9 100644 --- a/Contrib/LangDLL/LangDLL.c +++ b/Contrib/LangDLL/LangDLL.c @@ -75,25 +75,25 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case IDOK: // push result on the stack pushstring(langs[langs_num-SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCURSEL, 0, 0)-1].id); + // end dialog EndDialog(hwndDlg, 0); break; case IDCANCEL: // push "cancel" on the stack pushstring("cancel"); - EndDialog(hwndDlg, 1); + // end dialog + EndDialog(hwndDlg, 0); break; } break; - case WM_CLOSE: - // clean up, push "cancel" + case WM_DESTROY: + // clean up if (font) DeleteObject(font); - pushstring("cancel"); - EndDialog(hwndDlg, 1); break; default: - return 0; + return FALSE; // message not processed } - return 1; + return TRUE; // message processed } void __declspec(dllexport) LangDialog(HWND hwndParent, int string_size,