• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revisión10025 (tree)
Tiempo2022-06-26 01:15:18
Autorzmatsuo

Log Message

Theme editor を追加

- [設定]/[その他の設定]/Theme editor
- プロパティーページの追加
- 読み込まれているテーマを修正してファイルに出力できる

Cambiar Resumen

Diferencia incremental

--- branches/theme/teraterm/common/tt_res.h (revision 10024)
+++ branches/theme/teraterm/common/tt_res.h (revision 10025)
@@ -127,6 +127,7 @@
127127 #define IDC_PROTOFNAME 2301
128128 #define IDD_TABSHEET_COPYPASTE 2301
129129 #define IDC_PROTOPROT 2302
130+#define IDD_TABSHEET_THEME_EDITOR 2302
130131 #define IDC_PROTOPKTNUM 2303
131132 #define IDC_PROTOBYTECOUNT 2304
132133 #define IDC_PROTOPERCENT 2305
@@ -147,6 +148,7 @@
147148 #define IDC_BGIMG_EDIT 2510
148149 #define IDC_ROTATE_SIZE 2510
149150 #define IDC_THEME_EDIT 2511
151+#define IDC_BGIMG_EDIT2 2511
150152 #define IDC_CONFIRM_CHANGE_PASTE 2512
151153 #define IDC_CURSOR_CTRL_SEQ 2512
152154 #define IDC_LOG_ROTATE 2512
@@ -176,6 +178,7 @@
176178 #define IDC_CLIPBOARD_ACCESS_LABEL 2529
177179 #define IDC_ROTATE_SIZE_TYPE 2529
178180 #define IDC_THEME_BUTTON 2529
181+#define IDC_BGIMG_BUTTON2 2529
179182 #define IDC_CLIPBOARD_ACCESS 2530
180183 #define IDC_ROTATE_STEP 2530
181184 #define IDC_ROTATE_STEP_TEXT 2531
@@ -192,6 +195,13 @@
192195 #define IDC_OPT_TIMESTAMP_TYPE 2541
193196 #define IDC_BGIMG_BRIGHTNESS 2551
194197 #define IDC_EDIT_BGIMG_BRIGHTNESS 2552
198+#define IDC_BGIMG_BRIGHTNESS2 2553
199+#define IDC_EDIT_BGIMG_BRIGHTNESS2 2554
200+#define IDC_BGIMG_BRIGHTNESS3 2555
201+#define IDC_BGIMG_BRIGHTNESS4 2556
202+#define IDC_EDIT_BGIMG_BRIGHTNESS3 2557
203+#define IDC_EDIT_BGIMG_BRIGHTNESS4 2558
204+#define IDC_BGIMG_BRIGHTNESS5 2559
195205 #define IDC_TRIMNLCHAR 2564
196206 #define IDC_CLIPBOARD_NOTIFY 2566
197207 #define IDC_LIST_HIDDEN_FONTS 2567
@@ -219,6 +229,7 @@
219229 #define IDC_SELECT_ON_ACTIVATE 2589
220230 #define IDC_MIXED_THEME_FILE 2590
221231 #define IDC_ACCEPT_CLEAR_SBUFF 2591
232+#define IDC_MIXED_THEME_FILE2 2591
222233 #define IDC_DEBUG_POPUP_ENABLE 2592
223234 #define IDC_DEBUG_POPUP_KEY1 2593
224235 #define IDC_DEBUG_POPUP_KEY2 2594
@@ -238,6 +249,11 @@
238249 #define IDC_THEME_FILE 2609
239250 #define IDC_TH_READ 2610
240251 #define IDC_TH_WRITE 2611
252+#define IDC_BUTTON1 2612
253+#define IDC_BUTTON2 2613
254+#define IDC_BUTTON3 2614
255+#define IDC_COMBO1 2616
256+#define IDC_STATIC_HELP 2617
241257 #define ID_ACC_SENDBREAK 50001
242258 #define ID_ACC_COPY 50002
243259 #define ID_ACC_NEWCONNECTION 50003
@@ -338,7 +354,7 @@
338354 #define _APS_NO_MFC 1
339355 #define _APS_NEXT_RESOURCE_VALUE 132
340356 #define _APS_NEXT_COMMAND_VALUE 52031
341-#define _APS_NEXT_CONTROL_VALUE 2612
357+#define _APS_NEXT_CONTROL_VALUE 2618
342358 #define _APS_NEXT_SYMED_VALUE 101
343359 #endif
344360 #endif
--- branches/theme/teraterm/teraterm/addsetting.cpp (revision 10024)
+++ branches/theme/teraterm/teraterm/addsetting.cpp (revision 10025)
@@ -55,6 +55,7 @@
5555 #include "font_pp.h"
5656 #include "asprintf.h"
5757 #include "win32helper.h"
58+#include "vtdisp.h" // for ThemeEditorCreate()
5859
5960 const mouse_cursor_t MouseCursor[] = {
6061 {"ARROW", IDC_ARROW},
@@ -1692,6 +1693,8 @@
16921693 AddPage(page);
16931694 page = FontPageCreate(hInstance, &ts);
16941695 AddPage(page);
1696+ page = ThemeEditorCreate(hInstance, &ts);
1697+ AddPage(page);
16951698
16961699 wchar_t *title = TTGetLangStrW("Tera Term", "DLG_TABSHEET_TITLE", L"Tera Term: Additional settings", ts.UILanguageFile);
16971700 SetCaption(title);
--- branches/theme/teraterm/teraterm/vtdisp.c (revision 10024)
+++ branches/theme/teraterm/teraterm/vtdisp.c (revision 10025)
@@ -205,8 +205,63 @@
205205 static HBITMAP GetBitmapHandle(const char *File);
206206
207207
208-//便利関数☆
208+typedef struct {
209+ BG_PATTERN id;
210+ const char *str;
211+} BG_PATTERN_ST;
209212
213+static const BG_PATTERN_ST *GetBGPatternList(int index)
214+{
215+ static const BG_PATTERN_ST bg_pattern_list[] = {
216+ { BG_STRETCH, "stretch" },
217+ { BG_TILE, "tile" },
218+ { BG_CENTER, "center" },
219+ { BG_FIT_WIDTH, "fit_width" },
220+ { BG_FIT_HEIGHT, "fit_height" },
221+ { BG_AUTOFIT, "autofit" },
222+ { BG_AUTOFILL, "autofill" },
223+ };
224+
225+ if (index >= _countof(bg_pattern_list)) {
226+ return NULL;
227+ }
228+ return &bg_pattern_list[index];
229+}
230+
231+static const char *GetBGPatternStr(BG_PATTERN id)
232+{
233+ int index;
234+ for (index = 0;; index++) {
235+ const BG_PATTERN_ST *st = GetBGPatternList(index);
236+ if (st == NULL) {
237+ // 見つからない
238+ st = GetBGPatternList(0);
239+ return st->str;
240+ }
241+ if (st->id == id) {
242+ return st->str;
243+ }
244+ }
245+}
246+
247+static BOOL GetBGPatternID(const char *str, BG_PATTERN *pattern)
248+{
249+ int index;
250+ for (index = 0;; index++) {
251+ const BG_PATTERN_ST *st = GetBGPatternList(index);
252+ if (st == NULL) {
253+ // 見つからない
254+ st = GetBGPatternList(0);
255+ *pattern = st->id;
256+ return FALSE;
257+ }
258+ if (_stricmp(st->str, str) == 0) {
259+ *pattern = st->id;
260+ return TRUE;
261+ }
262+ }
263+}
264+
210265 // LoadImage() しか使えない環境かどうかを判別する。
211266 // LoadImage()では .bmp 以外の画像ファイルが扱えないので要注意。
212267 // (2014.4.20 yutaka)
@@ -1285,9 +1340,21 @@
12851340
12861341 static BG_PATTERN BGGetPattern(const char *name, BG_PATTERN def, const wchar_t *file)
12871342 {
1343+#if 0
12881344 static const char *strList[6] = {"stretch", "tile", "center", "fitwidth", "fitheight", "autofit"};
12891345
12901346 return BGGetStrIndex(name, def, file, strList, 6);
1347+#endif
1348+ BG_PATTERN retval;
1349+ char str[64];
1350+ GetPrivateProfileStringAFileW(BG_SECTION, name, "", str, _countof(str), file);
1351+ if (str[0] == 0) {
1352+ return def;
1353+ }
1354+ if (GetBGPatternID(str, &retval) == FALSE) {
1355+ retval = def;
1356+ }
1357+ return retval;
12911358 }
12921359
12931360 static BG_TYPE BGGetType(const char *name, BG_TYPE def, const wchar_t *file)
@@ -1436,6 +1503,41 @@
14361503 free(prevDir);
14371504 }
14381505
1506+void WriteInt3(const char *Sect, const char *Key, const wchar_t *FName,
1507+ int i1, int i2, int i3)
1508+{
1509+ char Temp[96];
1510+ _snprintf_s(Temp, sizeof(Temp), _TRUNCATE, "%d,%d,%d",
1511+ i1, i2,i3);
1512+ WritePrivateProfileStringAFileW(Sect, Key, Temp, FName);
1513+}
1514+
1515+void WriteCOLORREF(const char *Sect, const char *Key, const wchar_t *FName, COLORREF color)
1516+{
1517+ int red = color & 0xff;
1518+ int green = (color >> 8) & 0xff;
1519+ int blue = (color >> 16) & 0xff;
1520+
1521+ WriteInt3(Sect, Key, FName, red, green, blue);
1522+}
1523+
1524+/**
1525+ * テーマファイルの書き込み
1526+ */
1527+static void BGWriteIniFile(const wchar_t *file)
1528+{
1529+ WritePrivateProfileStringAFileW(BG_SECTION, BG_DESTFILE, BGDest.file, file);
1530+ WritePrivateProfileStringAFileW(BG_SECTION, "BGDestType",
1531+ BGDest.type == BG_PICTURE ? "picture" : "color", file);
1532+ WriteCOLORREF(BG_SECTION, "BGDestColor", file, BGDest.color);
1533+ WritePrivateProfileStringAFileW(BG_SECTION, "BGDestPattern", GetBGPatternStr(BGDest.pattern), file);
1534+
1535+ WritePrivateProfileIntAFileW(BG_SECTION, "BGSrc1Alpha", BGSrc1.alpha, file);
1536+
1537+ WritePrivateProfileIntAFileW(BG_SECTION, "BGSrc2Alpha", BGSrc2.alpha, file);
1538+ WriteCOLORREF(BG_SECTION, "BGSrc2Color", file, BGSrc2.color);
1539+}
1540+
14391541 static void BGDestruct(void)
14401542 {
14411543 if(!BGEnable)
@@ -3899,3 +4001,307 @@
38994001 }
39004002 return color;
39014003 }
4004+
4005+//////////////////////////////////////////////////////////////////////////////
4006+
4007+#include "tt_res.h"
4008+#include "dlglib.h"
4009+#include "tipwin2.h"
4010+#include "helpid.h"
4011+
4012+typedef struct _FontPPData {
4013+ HINSTANCE hInst;
4014+ TTTSet *pts;
4015+ DLGTEMPLATE *dlg_templ;
4016+ wchar_t *target_file;
4017+ TipWin2 *tipwin;
4018+} ThemeEditorData;
4019+
4020+static void SetWindowTextColor(HWND hWnd, COLORREF color)
4021+{
4022+ char str[32];
4023+ sprintf(str, "%02x%02x%02x", GetRValue(color), GetGValue(color), GetBValue(color));
4024+ SetWindowTextA(hWnd, str);
4025+}
4026+
4027+static void SetDlgItemTextColor(HWND hDlg, int ID, COLORREF color)
4028+{
4029+ SetWindowTextColor(GetDlgItem(hDlg, ID), color);
4030+}
4031+
4032+static COLORREF GetWindowTextColor(HWND hWnd)
4033+{
4034+ char str[32];
4035+ unsigned int r, g, b;
4036+ char elem[3];
4037+
4038+ GetWindowTextA(hWnd, str, _countof(str));
4039+
4040+ memcpy(elem, &str[0], 2);
4041+ elem[2] = 0;
4042+ r = 0;
4043+ sscanf(elem, "%x", &r);
4044+
4045+ memcpy(elem, &str[2], 2);
4046+ elem[2] = 0;
4047+ g = 0;
4048+ sscanf(elem, "%x", &g);
4049+
4050+ memcpy(elem, &str[4], 2);
4051+ elem[2] = 0;
4052+ b = 0;
4053+ sscanf(elem, "%x", &b);
4054+
4055+ return RGB(r, g, b);
4056+}
4057+
4058+static COLORREF GetDlgItemTextColor(HWND hDlg, int ID)
4059+{
4060+ return GetWindowTextColor(GetDlgItem(hDlg, ID));
4061+}
4062+
4063+static void ResetControls(HWND hWnd, ThemeEditorData *dlg_data)
4064+{
4065+ SendDlgItemMessage(hWnd, IDC_BGIMG_CHECK, BM_SETCHECK, (BGDest.type == BG_PICTURE) ? TRUE : FALSE, 0);
4066+ SetDlgItemTextA(hWnd, IDC_BGIMG_EDIT, BGDest.file);
4067+ SetDlgItemTextColor(hWnd, IDC_EDIT_BGIMG_BRIGHTNESS4, BGDest.color);
4068+ {
4069+ int count = SendDlgItemMessageA(hWnd, IDC_COMBO1, CB_GETCOUNT, 0, 0);
4070+ int sel = 0;
4071+ int i;
4072+ for (i = 0; i < count; i++) {
4073+ BG_PATTERN pattern = (BG_PATTERN)SendDlgItemMessageW(hWnd, IDC_COMBO1, CB_GETITEMDATA, i, 0);
4074+ if (pattern == BGDest.pattern) {
4075+ sel = i;
4076+ break;
4077+ }
4078+ }
4079+ SendDlgItemMessage(hWnd, IDC_COMBO1, CB_SETCURSEL, sel, 0);
4080+ }
4081+
4082+
4083+ SendDlgItemMessage(hWnd, IDC_MIXED_THEME_FILE, BM_SETCHECK, BGSrc1.alpha != 0, 0);
4084+ SetDlgItemInt(hWnd, IDC_EDIT_BGIMG_BRIGHTNESS3, BGSrc1.alpha, FALSE);
4085+
4086+ SendDlgItemMessage(hWnd, IDC_MIXED_THEME_FILE2, BM_SETCHECK, BGSrc2.alpha != 0, 0);
4087+ SetDlgItemInt(hWnd, IDC_EDIT_BGIMG_BRIGHTNESS2, BGSrc2.alpha, FALSE);
4088+ SetDlgItemTextColor(hWnd, IDC_EDIT_BGIMG_BRIGHTNESS, BGSrc2.color);
4089+}
4090+
4091+static INT_PTR CALLBACK Proc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
4092+{
4093+ static const DlgTextInfo TextInfos[] = {
4094+ {0, "DLG_GEN_TITLE"},
4095+ };
4096+ ThemeEditorData *dlg_data = (ThemeEditorData *)GetWindowLongPtr(hWnd, DWLP_USER);
4097+ TTTSet *ts = dlg_data == NULL ? NULL : dlg_data->pts;
4098+
4099+ switch (msg) {
4100+ case WM_INITDIALOG: {
4101+ int i;
4102+ dlg_data = (ThemeEditorData *)(((PROPSHEETPAGEW_V1 *)lp)->lParam);
4103+ ts = dlg_data->pts;
4104+ SetWindowLongPtr(hWnd, DWLP_USER, (LONG_PTR)dlg_data);
4105+
4106+ dlg_data->tipwin = TipWin2Create(NULL, hWnd);
4107+ TipWin2SetTextW(dlg_data->tipwin, IDC_BGIMG_EDIT2,
4108+ L"いま表示されているテーマファイル名"
4109+ );
4110+ TipWin2SetTextW(dlg_data->tipwin, IDC_BUTTON1,
4111+ L"target file を再読み込みする\n"
4112+ L"将来は、任意のテーマファイルを読み込めるようにする"
4113+ );
4114+ TipWin2SetTextW(dlg_data->tipwin, IDC_BUTTON3,
4115+ L"現在のダイアログの状態をテーマファイルに書き込む\n"
4116+ L"書き込んだイファイル(テーマファイル)を\n"
4117+ L"「表示タブ」で読み込み指定して、「ok」押すと反映される\n"
4118+ L"このページの設定はこれで書き出さないと失われる\n"
4119+ );
4120+ SetDlgItemTextW(hWnd, IDC_STATIC_HELP,
4121+ L"次の順で合成されて、背景に表示される\n"
4122+ L"base\n"
4123+ L"↓\n"
4124+ L"Background Image\n"
4125+ L"↓\n"
4126+ L"wallpaper\n"
4127+ L"↓\n"
4128+ L"simple color plane"
4129+ );
4130+
4131+ for (i = 0;; i++) {
4132+ int index;
4133+ const BG_PATTERN_ST *st = GetBGPatternList(i);
4134+ if (st == NULL) {
4135+ break;
4136+ }
4137+ index = SendDlgItemMessageA(hWnd, IDC_COMBO1, CB_ADDSTRING, 0, (LPARAM)st->str);
4138+ SendDlgItemMessageW(hWnd, IDC_COMBO1, CB_SETITEMDATA, index, st->id);
4139+ }
4140+ SetDlgItemTextW(hWnd, IDC_BGIMG_EDIT2, dlg_data->target_file);
4141+ ResetControls(hWnd, dlg_data);
4142+
4143+ break;
4144+ }
4145+ case WM_NOTIFY: {
4146+ NMHDR *nmhdr = (NMHDR *)lp;
4147+ switch (nmhdr->code) {
4148+ case PSN_APPLY: {
4149+ TipWin2Destroy(dlg_data->tipwin);
4150+ dlg_data->tipwin = NULL;
4151+ break;
4152+ }
4153+ case PSN_HELP:
4154+ MessageBox(hWnd, "Tera Term", "not implimented",
4155+ MB_OK | MB_ICONEXCLAMATION);
4156+ break;
4157+ default:
4158+ break;
4159+ }
4160+ break;
4161+ }
4162+ case WM_COMMAND: {
4163+ switch (wp) {
4164+ case IDC_BUTTON1 | (BN_CLICKED << 16): {
4165+ // 再読み込み
4166+ wchar_t *theme_file;
4167+ hGetDlgItemTextW(hWnd, IDC_BGIMG_EDIT2, &theme_file);
4168+ free(ts->EtermLookfeel.BGThemeFileW);
4169+ ts->EtermLookfeel.BGThemeFileW = theme_file;
4170+
4171+ BGReadIniFile(ts->EtermLookfeel.BGThemeFileW);
4172+ ResetControls(hWnd, dlg_data);
4173+ BGSetupPrimary(TRUE);
4174+ break;
4175+ }
4176+ case IDC_BGIMG_BUTTON | (BN_CLICKED << 16): {
4177+ // 画像ファイル選択
4178+ OPENFILENAMEW ofn = {0};
4179+ wchar_t bg_file[MAX_PATH];
4180+ wchar_t *bg_file_in;
4181+
4182+ hGetDlgItemTextW(hWnd, IDC_BGIMG_EDIT, &bg_file_in);
4183+ wcscpy_s(bg_file, _countof(bg_file), bg_file_in);
4184+ free(bg_file_in);
4185+
4186+ ofn.lStructSize = get_OPENFILENAME_SIZEW();
4187+ ofn.hwndOwner = hWnd;
4188+ ofn.lpstrFile = bg_file;
4189+ ofn.nMaxFile = _countof(bg_file);
4190+ //ofn.lpstrFilter = "";
4191+ ofn.nFilterIndex = 1;
4192+ ofn.hInstance = hInst;
4193+ ofn.lpstrDefExt = L"jpg";
4194+ ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY;
4195+ ofn.lpstrTitle = L"select bg image file";
4196+
4197+ if (GetOpenFileNameW(&ofn)) {
4198+ SetDlgItemTextW(hWnd, IDC_BGIMG_EDIT, bg_file);
4199+ }
4200+ break;
4201+ }
4202+ case IDC_BUTTON3 | (BN_CLICKED << 16): {
4203+ // コントロールから読み出し
4204+ wchar_t *theme_file_in;
4205+ wchar_t theme_file[MAX_PATH];
4206+ OPENFILENAMEW ofn = {0};
4207+ {
4208+ LRESULT checked;
4209+ int index;
4210+ checked = SendDlgItemMessageA(hWnd, IDC_BGIMG_CHECK, BM_GETCHECK, 0, 0);
4211+ BGDest.type = checked & BST_CHECKED ? BG_PICTURE : BG_COLOR;
4212+ GetDlgItemTextA(hWnd, IDC_BGIMG_EDIT, BGDest.file, sizeof(BGDest.file));
4213+ BGDest.color = GetDlgItemTextColor(hWnd, IDC_EDIT_BGIMG_BRIGHTNESS4);
4214+ index = SendDlgItemMessage(hWnd, IDC_COMBO1, CB_GETCURSEL, 0, 0);
4215+ BGDest.pattern = (BG_PATTERN)SendDlgItemMessage(hWnd, IDC_COMBO1, CB_GETITEMDATA, index, 0);
4216+
4217+ checked = SendDlgItemMessageA(hWnd, IDC_MIXED_THEME_FILE, BM_GETCHECK, 0, 0);
4218+ if (checked & BST_CHECKED) {
4219+ BGSrc1.alpha = GetDlgItemInt(hWnd, IDC_EDIT_BGIMG_BRIGHTNESS3, NULL, FALSE);
4220+ } else {
4221+ BGSrc1.alpha = 0;
4222+ }
4223+
4224+ checked = SendDlgItemMessageA(hWnd, IDC_MIXED_THEME_FILE2, BM_GETCHECK, 0, 0);
4225+ if (checked & BST_CHECKED) {
4226+ BGSrc2.alpha = GetDlgItemInt(hWnd, IDC_EDIT_BGIMG_BRIGHTNESS, NULL, FALSE);
4227+ } else {
4228+ BGSrc2.alpha = 0;
4229+ }
4230+ BGSrc2.color = GetDlgItemTextColor(hWnd, IDC_EDIT_BGIMG_BRIGHTNESS);
4231+ }
4232+
4233+ hGetDlgItemTextW(hWnd, IDC_BGIMG_EDIT2, &theme_file_in);
4234+ wcscpy_s(theme_file, _countof(theme_file), theme_file_in);
4235+ free(theme_file_in);
4236+
4237+ ofn.lStructSize = get_OPENFILENAME_SIZEW();
4238+ ofn.hwndOwner = hWnd;
4239+ ofn.lpstrFile = theme_file;
4240+ ofn.nMaxFile = _countof(theme_file);
4241+ //ofn.lpstrFilter = "";
4242+ ofn.nFilterIndex = 1;
4243+ ofn.hInstance = hInst;
4244+ ofn.lpstrDefExt = L"ini";
4245+ ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY;
4246+ ofn.lpstrTitle = L"save theme file";
4247+
4248+ if (GetSaveFileNameW(&ofn)) {
4249+ BGWriteIniFile(theme_file);
4250+ }
4251+ break;
4252+ }
4253+ default:
4254+ break;
4255+ }
4256+ break;
4257+ }
4258+ default:
4259+ return FALSE;
4260+ }
4261+ return FALSE;
4262+}
4263+
4264+static UINT CALLBACK CallBack(HWND hwnd, UINT uMsg, struct _PROPSHEETPAGEW *ppsp)
4265+{
4266+ UINT ret_val = 0;
4267+ (void)hwnd;
4268+ switch (uMsg) {
4269+ case PSPCB_CREATE:
4270+ ret_val = 1;
4271+ break;
4272+ case PSPCB_RELEASE:
4273+ free((void *)ppsp->pResource);
4274+ ppsp->pResource = NULL;
4275+ free((void *)ppsp->lParam);
4276+ ppsp->lParam = 0;
4277+ break;
4278+ default:
4279+ break;
4280+ }
4281+ return ret_val;
4282+}
4283+
4284+HPROPSHEETPAGE ThemeEditorCreate(HINSTANCE inst, TTTSet *pts)
4285+{
4286+ const int id = IDD_TABSHEET_THEME_EDITOR;
4287+ PROPSHEETPAGEW_V1 psp = {0};
4288+
4289+ ThemeEditorData *Param = (ThemeEditorData *)calloc(sizeof(ThemeEditorData), 1);
4290+ Param->target_file = _wcsdup(pts->EtermLookfeel.BGThemeFileW);
4291+ Param->pts = &ts;
4292+
4293+ psp.dwSize = sizeof(psp);
4294+ psp.dwFlags = PSP_DEFAULT | PSP_USECALLBACK | PSP_USETITLE /*| PSP_HASHELP */;
4295+ psp.hInstance = inst;
4296+ psp.pfnCallback = CallBack;
4297+ psp.pszTitle = L"Theme Editor"; // TODO lng ファイルに入れる
4298+ psp.pszTemplate = MAKEINTRESOURCEW(id);
4299+ psp.dwFlags |= PSP_DLGINDIRECT;
4300+ Param->dlg_templ = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(id));
4301+ psp.pResource = Param->dlg_templ;
4302+
4303+ psp.pfnDlgProc = Proc;
4304+ psp.lParam = (LPARAM)Param;
4305+
4306+ return CreatePropertySheetPageW((LPPROPSHEETPAGEW)&psp);
4307+}
--- branches/theme/teraterm/teraterm/vtdisp.h (revision 10024)
+++ branches/theme/teraterm/teraterm/vtdisp.h (revision 10025)
@@ -153,6 +153,8 @@
153153 #define WINDOW_REFRESH 6
154154 #define WINDOW_TOGGLE_MAXIMIZE 7
155155
156+HPROPSHEETPAGE ThemeEditorCreate(HINSTANCE inst, TTTSet *pts);
157+
156158 #ifdef __cplusplus
157159 }
158160 #endif
Show on old repository browser