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
This commit is contained in:
parent
3b16701629
commit
f555ea4420
1 changed files with 7 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue