[ttssh2-commit] [10293] SDKのバージョンが低い場合でもビルドが通るよう修正

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2022年 10月 2日 (日) 01:37:03 JST


Revision: 10293
          https://osdn.net/projects/ttssh2/scm/svn/commits/10293
Author:   zmatsuo
Date:     2022-10-02 01:37:03 +0900 (Sun, 02 Oct 2022)
Log Message:
-----------
SDKのバージョンが低い場合でもビルドが通るよう修正

- VS2005、MinGW でビルドが通らなかったので修正
  - r10291 の修正から
- MinGW でビルド時に日本語文字列箇所でエラーが出るので #if で分けた
  - TODO i18n化, lng に追加

Revision Links:
--------------
    https://osdn.net/projects/ttssh2/scm/svn/commits/10291

Modified Paths:
--------------
    trunk/teraterm/teraterm/addsetting.cpp

-------------- next part --------------
Modified: trunk/teraterm/teraterm/addsetting.cpp
===================================================================
--- trunk/teraterm/teraterm/addsetting.cpp	2022-10-01 04:11:59 UTC (rev 10292)
+++ trunk/teraterm/teraterm/addsetting.cpp	2022-10-01 16:37:03 UTC (rev 10293)
@@ -33,7 +33,7 @@
 #include <stdio.h>
 #include <windows.h>
 #include <commctrl.h>
-#include <dwmapi.h>
+//#include <dwmapi.h>	// compat_win.h \x93\xE0\x82̒\xE8\x8B`\x82\xF0\x8Eg\x97p\x82\xB7\x82邽\x82\xDF include \x82\xB5\x82Ȃ\xA2
 #define _CRTDBG_MAP_ALLOC
 #include <stdlib.h>
 #include <crtdbg.h>
@@ -712,13 +712,24 @@
 
 	// (2) theme file
 	{
-		SendDlgItemMessageA(IDC_THEME_FILE, CB_ADDSTRING, 0, (LPARAM)"\x8Eg\x97p\x82\xB5\x82Ȃ\xA2");
-		SendDlgItemMessageA(IDC_THEME_FILE, CB_ADDSTRING, 1, (LPARAM)"\x8CŒ\xE8\x83e\x81[\x83}(\x83e\x81[\x83}\x83t\x83@\x83C\x83\x8B\x8Ew\x92\xE8)");
-		SendDlgItemMessageA(IDC_THEME_FILE, CB_ADDSTRING, 2, (LPARAM)"\x83\x89\x83\x93\x83_\x83\x80\x83e\x81[\x83}");
+		// TODO i18n
+		const static I18nTextInfo theme_select[] = {
+#if defined(_MSC_VER)
+			{ NULL, L"\x8Eg\x97p\x82\xB5\x82Ȃ\xA2" },
+			{ NULL, L"\x8CŒ\xE8\x83e\x81[\x83}(\x83e\x81[\x83}\x83t\x83@\x83C\x83\x8B\x8Ew\x92\xE8)" },
+			{ NULL, L"\x83\x89\x83\x93\x83_\x83\x80\x83e\x81[\x83}" },
+#else
+			{ NULL, L"no use" },
+			{ NULL, L"fixed theme file" },
+			{ NULL, L"random theme file" },
+#endif
+		};
+
 		int sel = ts.EtermLookfeel.BGEnable;
 		if (sel < 0) sel = 0;
 		if (sel > 2) sel = 2;
-		SendDlgItemMessageA(IDC_THEME_FILE, CB_SETCURSEL, sel, 0);
+		SetI18nListW("Tera Term", m_hWnd, IDC_THEME_FILE, theme_select, _countof(theme_select),
+					 ts.UILanguageFileW, sel);
 		BOOL enable = (sel == 1) ? TRUE : FALSE;
 		EnableDlgItem(IDC_THEME_EDIT, enable);
 		EnableDlgItem(IDC_THEME_BUTTON, enable);


ttssh2-commit メーリングリストの案内
Back to archive index