mirror of https://github.com/OpenVPN/openvpn-gui
Construct version string in About dialog at runtime
Required to match the previous commit that removed macro substitution in resource text strings. Signed-off-by: Selva Nair <selva.nair@gmail.com>pull/425/head
parent
56efcc6515
commit
5d209f44cb
14
main.c
14
main.c
|
@ -646,9 +646,17 @@ static INT_PTR CALLBACK
|
||||||
AboutDialogFunc(UNUSED HWND hDlg, UINT msg, UNUSED WPARAM wParam, LPARAM lParam)
|
AboutDialogFunc(UNUSED HWND hDlg, UINT msg, UNUSED WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LPPSHNOTIFY psn;
|
LPPSHNOTIFY psn;
|
||||||
if (msg == WM_NOTIFY) {
|
wchar_t tmp1[256], tmp2[256];
|
||||||
psn = (LPPSHNOTIFY) lParam;
|
switch (msg) {
|
||||||
if (psn->hdr.code == (UINT) PSN_APPLY)
|
case WM_INITDIALOG:
|
||||||
|
if (GetDlgItemText(hDlg, ID_TXT_VERSION, tmp1, _countof(tmp1))) {
|
||||||
|
_sntprintf_0(tmp2, tmp1, TEXT(PACKAGE_VERSION_RESOURCE_STR));
|
||||||
|
SetDlgItemText(hDlg, ID_TXT_VERSION, tmp2);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case WM_NOTIFY:
|
||||||
|
psn = (LPPSHNOTIFY) lParam;
|
||||||
|
if (psn->hdr.code == (UINT) PSN_APPLY)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue