Revision: 8632 https://osdn.net/projects/ttssh2/scm/svn/commits/8632 Author: zmatsuo Date: 2020-03-28 00:42:04 +0900 (Sat, 28 Mar 2020) Log Message: ----------- Fix yesnobox showing OK/No - lng ファイルを読み込まなかったとき - ボタンの文字が設定されずに "OK" のままとなっていた - ticket #40286 Ticket Links: ------------ https://osdn.net/projects/ttssh2/tracker/detail/40286 Modified Paths: -------------- trunk/teraterm/ttpmacro/msgdlg.cpp -------------- next part -------------- Modified: trunk/teraterm/ttpmacro/msgdlg.cpp =================================================================== --- trunk/teraterm/ttpmacro/msgdlg.cpp 2020-03-26 15:40:34 UTC (rev 8631) +++ trunk/teraterm/ttpmacro/msgdlg.cpp 2020-03-27 15:42:04 UTC (rev 8632) @@ -1,6 +1,6 @@ /* * Copyright (C) 1994-1998 T. Teranishi - * (C) 2006-2019 TeraTerm Project + * (C) 2006-2020 TeraTerm Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -61,19 +61,22 @@ BOOL CMsgDlg::OnInitDialog() { - static const DlgTextInfo TextInfosOk[] = { - { IDOK, "BTN_OK" }, - }; - static const DlgTextInfo TextInfosYesNo[] = { - { IDOK, "BTN_YES" }, - { IDCANCEL, "BTN_NO" }, - }; RECT R; HWND HOk; + // IDOK \x82̃f\x83t\x83H\x83\x8B\x83g "OK", \x95\\x8E\xA6 + // IDCANCEL \x82̃f\x83t\x83H\x83\x8B\x83g "No", \x94\xF1\x95\\x8E\xA6 if (YesNoFlag) { + static const DlgTextInfo TextInfosYesNo[] = { + { IDOK, "BTN_YES" }, + { IDCANCEL, "BTN_NO" }, + }; + SetDlgItemTextA(IDOK, "Yes"); // lng \x83t\x83@\x83C\x83\x8B\x82Ȃ\xB5\x91\xF4 SetDlgTexts(m_hWnd, TextInfosYesNo, _countof(TextInfosYesNo), UILanguageFile); } else { + static const DlgTextInfo TextInfosOk[] = { + { IDOK, "BTN_OK" }, + }; SetDlgTexts(m_hWnd, TextInfosOk, _countof(TextInfosOk), UILanguageFile); }