diff --git a/localization.c b/localization.c index 33793c4..3bfd728 100755 --- a/localization.c +++ b/localization.c @@ -248,7 +248,7 @@ LocalizedDialogBox(const UINT dialogId, DLGPROC dialogFunc) HWND -CreateLocalizedDialog(const UINT dialogId, DLGPROC dialogFunc) +CreateLocalizedDialogParam(const UINT dialogId, DLGPROC dialogFunc, const LPARAM param) { /* find dialog resource */ HRSRC res = FindResourceLang(RT_DIALOG, MAKEINTRESOURCE(dialogId), GetGUILanguage()); @@ -259,7 +259,14 @@ CreateLocalizedDialog(const UINT dialogId, DLGPROC dialogFunc) if (resInfo == NULL) return NULL; - return CreateDialogIndirect(o.hInstance, resInfo, NULL, dialogFunc); + return CreateDialogIndirectParam(o.hInstance, resInfo, NULL, dialogFunc, param); +} + + +HWND +CreateLocalizedDialog(const UINT dialogId, DLGPROC dialogFunc) +{ + return CreateLocalizedDialogParam(dialogId, dialogFunc, 0); } diff --git a/localization.h b/localization.h index 9e67b0b..b9b7597 100755 --- a/localization.h +++ b/localization.h @@ -29,6 +29,7 @@ HICON LoadLocalizedIcon(const UINT); LPCDLGTEMPLATE LocalizedDialogResource(const UINT); INT_PTR LocalizedDialogBoxParam(const UINT, DLGPROC, const LPARAM); INT_PTR LocalizedDialogBox(const UINT, DLGPROC); +HWND CreateLocalizedDialogParam(const UINT, DLGPROC, const LPARAM); HWND CreateLocalizedDialog(const UINT, DLGPROC); BOOL CALLBACK LanguageSettingsDlgProc(HWND, UINT, WPARAM, LPARAM);