Skip to content

Commit

Permalink
TTGetDlgTemplate() などのリソース引数の型 LPCTSTR を LPCWSTR に変更した
Browse files Browse the repository at this point in the history
- MAKEINTRESOURCE(), MAKEINTRESOURCEA() を MAKEINTRESOURCEW() に置き換えた
- ダイアログリソース読み込みを FindResource() から FindResourceW() へ変更した
- DialogBoxParam() を TTDialogBoxParam() に置き換えた
  - 修正前は #define を使って置換していた
  • Loading branch information
zmatsuo committed Sep 13, 2024
1 parent e886393 commit edba256
Show file tree
Hide file tree
Showing 40 changed files with 128 additions and 164 deletions.
8 changes: 2 additions & 6 deletions TTProxy/YCL/include/YCL/Dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Dialog : virtual public Window {
SendMessage(WM_NEXTDLGCTL, previous, FALSE);
}
void gotoDlgCtrl(HWND control) {
SendMessage(WM_NEXTDLGCTL, (WPARAM) control, TRUE);
SendMessage(WM_NEXTDLGCTL, (WPARAM) control, TRUE);
}


Expand All @@ -101,11 +101,7 @@ class Dialog : virtual public Window {
}
INT_PTR open(HINSTANCE instance, int resourceId, HWND owner = NULL) {
YCLVERIFY(prepareOpen(this) == NULL, "Another dialog has been opening yet.");
#if 0
return ::DialogBoxParam(instance, MAKEINTRESOURCE(resourceId), owner, DialogProc, NULL);
#else
return TTDialogBoxParam(instance, MAKEINTRESOURCE(resourceId), owner, DialogProc, NULL);
#endif
return TTDialogBoxParam(instance, MAKEINTRESOURCEW(resourceId), owner, DialogProc, NULL);
}
protected:
virtual bool dispatch(UINT message, WPARAM wparam, LPARAM lparam) {
Expand Down
2 changes: 1 addition & 1 deletion TTXSamples/TTXCheckUpdate/ttxcheckupdate.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ static void ShowDialog(HWND hWnd)
/* ダイアログを出す */
SetDialogFont(pvar->ts->DialogFontNameW, pvar->ts->DialogFontPoint, pvar->ts->DialogFontCharSet,
pvar->ts->UILanguageFileW, "Tera Term", "DLG_TAHOMA_FONT");
TTDialogBoxParam(pvar->hInst, MAKEINTRESOURCE(IDD_CHECK_UPDATE_DIALOG), hWnd, DlgProc, (LPARAM)pvar);
TTDialogBoxParam(pvar->hInst, MAKEINTRESOURCEW(IDD_CHECK_UPDATE_DIALOG), hWnd, DlgProc, (LPARAM)pvar);

/* 終了 */
free(json_ptr);
Expand Down
2 changes: 1 addition & 1 deletion TTXSamples/TTXRecurringCommand/TTXRecurringCommand.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ static int PASCAL TTXProcessCommand(HWND hWin, WORD cmd) {
case ID_MENU_SETUP:
SetDialogFont(pvar->ts->DialogFontNameW, pvar->ts->DialogFontPoint, pvar->ts->DialogFontCharSet,
pvar->ts->UILanguageFileW, SECTION, "DLG_TAHOMA_FONT");
switch (TTDialogBoxParam(hInst, MAKEINTRESOURCE(IDD_SETUP_RECURRINGCOMMAND),
switch (TTDialogBoxParam(hInst, MAKEINTRESOURCEW(IDD_SETUP_RECURRINGCOMMAND),
hWin, RecurringCommandSetting, (LPARAM)NULL)) {
case IDOK:
break;
Expand Down
4 changes: 2 additions & 2 deletions TTXSamples/TTXViewMode/TTXViewMode.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static int PASCAL TTXProcessCommand(HWND hWin, WORD cmd) {
if (strcmp(pvar->password, "") != 0) {
SetDialogFont(pvar->ts->DialogFontNameW, pvar->ts->DialogFontPoint, pvar->ts->DialogFontCharSet,
pvar->ts->UILanguageFileW, "TTXViewMode", "DLG_TAHOMA_FONT");
switch (TTDialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INPUT_PASSWORD), hWin, ViewModeInputPass, (LPARAM)NULL)) {
switch (TTDialogBoxParam(hInst, MAKEINTRESOURCEW(IDD_INPUT_PASSWORD), hWin, ViewModeInputPass, (LPARAM)NULL)) {
case IDOK:
pvar->enable = FALSE;
CheckMenuItem(pvar->ControlMenu, ID_MENU_VIEWMODE, MF_BYCOMMAND | MF_UNCHECKED);
Expand All @@ -251,7 +251,7 @@ static int PASCAL TTXProcessCommand(HWND hWin, WORD cmd) {
case ID_MENU_SETPASS:
SetDialogFont(pvar->ts->DialogFontNameW, pvar->ts->DialogFontPoint, pvar->ts->DialogFontCharSet,
pvar->ts->UILanguageFileW, "TTXViewMode", "DLG_TAHOMA_FONT");
switch (TTDialogBoxParam(hInst, MAKEINTRESOURCE(IDD_SET_PASSWORD), hWin, ViewModeSetPass, (LPARAM)NULL)) {
switch (TTDialogBoxParam(hInst, MAKEINTRESOURCEW(IDD_SET_PASSWORD), hWin, ViewModeSetPass, (LPARAM)NULL)) {
case IDOK:
break;
case IDCANCEL:
Expand Down
10 changes: 5 additions & 5 deletions teraterm/common/dlglib.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void SetEditboxEmacsKeybind(HWND hDlg, int nID);
void TTSetDlgFontA(const char *face, int height, int charset);
void TTSetDlgFontW(const wchar_t *face, int height, int charset);
const wchar_t *TTGetClassName(const DLGTEMPLATE *DlgTempl);
DLGTEMPLATE *TTGetDlgTemplate(HINSTANCE hInst, LPCTSTR lpTemplateName);
DLGTEMPLATE *TTGetDlgTemplate(HINSTANCE hInst, LPCWSTR lpTemplateName);
DLGTEMPLATE *TTGetNewDlgTemplate(
HINSTANCE hInst, const DLGTEMPLATE *src,
size_t *PrevTemplSize, size_t *NewTemplSize);
Expand All @@ -66,24 +66,24 @@ HWND TTCreateDialogIndirectParam(
LPARAM lParamInit);
HWND TTCreateDialogParam(
HINSTANCE hInstance,
LPCTSTR lpTemplateName,
LPCWSTR lpTemplateName,
HWND hWndParent,
DLGPROC lpDialogFunc,
LPARAM lParamInit);
HWND TTCreateDialog(
HINSTANCE hInstance,
LPCTSTR lpTemplateName,
LPCWSTR lpTemplateName,
HWND hWndParent,
DLGPROC lpDialogFunc);
INT_PTR TTDialogBoxParam(
HINSTANCE hInstance,
LPCTSTR lpTemplateName,
LPCWSTR lpTemplateName,
HWND hWndParent,
DLGPROC lpDialogFunc,
LPARAM lParamInit);
INT_PTR TTDialogBox(
HINSTANCE hInstance,
LPCTSTR lpTemplateName,
LPCWSTR lpTemplateName,
HWND hWndParent,
DLGPROC lpDialogFunc);
void SetDialogFont(const wchar_t *FontName, int FontHeight, int FontCharSet,
Expand Down
10 changes: 5 additions & 5 deletions teraterm/common/dlglib_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ BOOL TTEndDialog(HWND hDlgWnd, INT_PTR nResult)
*/
HWND TTCreateDialogIndirectParam(
HINSTANCE hInstance,
LPCTSTR lpTemplateName,
LPCWSTR lpTemplateName,
HWND hWndParent, // オーナーウィンドウのハンドル
DLGPROC lpDialogFunc, // ダイアログボックスプロシージャへのポインタ
LPARAM lParamInit) // 初期化値
Expand All @@ -73,7 +73,7 @@ HWND TTCreateDialogIndirectParam(
*/
HWND TTCreateDialogParam(
HINSTANCE hInstance,
LPCTSTR lpTemplateName,
LPCWSTR lpTemplateName,
HWND hWndParent,
DLGPROC lpDialogFunc,
LPARAM lParamInit)
Expand All @@ -87,7 +87,7 @@ HWND TTCreateDialogParam(
*/
HWND TTCreateDialog(
HINSTANCE hInstance,
LPCTSTR lpTemplateName,
LPCWSTR lpTemplateName,
HWND hWndParent,
DLGPROC lpDialogFunc)
{
Expand All @@ -99,7 +99,7 @@ HWND TTCreateDialog(
* DialogBoxParam() 互換関数
* EndDialog()ではなく、TTEndDialog()を使用すること
*/
INT_PTR TTDialogBoxParam(HINSTANCE hInstance, LPCTSTR lpTemplateName,
INT_PTR TTDialogBoxParam(HINSTANCE hInstance, LPCWSTR lpTemplateName,
HWND hWndParent, // オーナーウィンドウのハンドル
DLGPROC lpDialogFunc, // ダイアログボックスプロシージャへのポインタ
LPARAM lParamInit) // 初期化値
Expand All @@ -114,7 +114,7 @@ INT_PTR TTDialogBoxParam(HINSTANCE hInstance, LPCTSTR lpTemplateName,
* DialogBox() 互換関数
* EndDialog()ではなく、TTEndDialog()を使用すること
*/
INT_PTR TTDialogBox(HINSTANCE hInstance, LPCTSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc)
INT_PTR TTDialogBox(HINSTANCE hInstance, LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc)
{
return TTDialogBoxParam(hInstance, lpTemplateName, hWndParent, lpDialogFunc, (LPARAM)NULL);
}
Expand Down
8 changes: 5 additions & 3 deletions teraterm/common/dlglib_tmpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,13 @@ static DLGTEMPLATE *GetDlgTemplate(
}

static DLGTEMPLATE *GetDlgTemplate(
HINSTANCE hInst, LPCTSTR lpTemplateName,
HINSTANCE hInst, LPCWSTR lpTemplateName,
const WCHAR *FontFaceName, LONG FontHeight, BYTE FontCharSet,
size_t *PrevTemplSize, size_t *NewTemplSize)
{
HRSRC hResource = ::FindResource(hInst, lpTemplateName, RT_DIALOG);
#define RT_DIALOG_W MAKEINTRESOURCEW(5)

HRSRC hResource = ::FindResourceW(hInst, lpTemplateName, RT_DIALOG_W);
assert(hResource != NULL);
HANDLE hDlgTemplate = ::LoadResource(hInst, hResource);
const DLGTEMPLATE *src = (DLGTEMPLATE *)::LockResource(hDlgTemplate);
Expand Down Expand Up @@ -471,7 +473,7 @@ DLGTEMPLATE *TTGetNewDlgTemplate(
return DlgTemplate;
}

DLGTEMPLATE *TTGetDlgTemplate(HINSTANCE hInst, LPCTSTR lpTemplateName)
DLGTEMPLATE *TTGetDlgTemplate(HINSTANCE hInst, LPCWSTR lpTemplateName)
{
DLGTEMPLATE *DlgTemplate =
GetDlgTemplate(hInst, lpTemplateName,
Expand Down
2 changes: 1 addition & 1 deletion teraterm/common/edithistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ BOOL EditHistoryDlg(HWND WndParent, PTTSet ts)
const HINSTANCE hinst = (HINSTANCE)GetWindowLongPtr(WndParent, GWLP_HINSTANCE);
data->ts = ts;
r= (BOOL)TTDialogBoxParam(hinst,
MAKEINTRESOURCE(IDD_EDITHISTORYDLG),
MAKEINTRESOURCEW(IDD_EDITHISTORYDLG),
WndParent, TCPIPDlg, (LPARAM)data);
free(data);
return r;
Expand Down
4 changes: 2 additions & 2 deletions teraterm/common/tmfc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ INT_PTR TTCDialog::DoModal(HINSTANCE hInstance, HWND hParent, int idd)
#if defined(REWRITE_TEMPLATE)
INT_PTR result =
TTDialogBoxParam(hInstance,
MAKEINTRESOURCE(idd),
MAKEINTRESOURCEW(idd),
hParent,
&DlgProcStub, (LPARAM)this);
#else
Expand All @@ -503,7 +503,7 @@ BOOL TTCDialog::Create(HINSTANCE hInstance, HWND hParent, int idd)
m_hInst = hInstance;
m_hParentWnd = hParent;
#if defined(REWRITE_TEMPLATE)
DLGTEMPLATE *lpTemplate = TTGetDlgTemplate(hInstance, MAKEINTRESOURCE(idd));
DLGTEMPLATE *lpTemplate = TTGetDlgTemplate(hInstance, MAKEINTRESOURCEW(idd));
#else
HRSRC hResource = ::FindResource(hInstance, MAKEINTRESOURCE(idd), RT_DIALOG);
HANDLE hDlgTemplate = ::LoadResource(hInstance, hResource);
Expand Down
2 changes: 1 addition & 1 deletion teraterm/common/tmfc_property.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ TTCPropertyPage::TTCPropertyPage(HINSTANCE inst, int id)
m_psp.pszTemplate = MAKEINTRESOURCEW(id);
#if defined(REWRITE_TEMPLATE)
m_psp.dwFlags |= PSP_DLGINDIRECT;
m_psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(id));
m_psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEW(id));
#endif
m_psp.pfnDlgProc = Proc;
m_psp.lParam = (LPARAM)this;
Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/broadcast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ void BroadCastShowDialog(HINSTANCE hInst, HWND hWnd)
// CreateDialogW() で生成したダイアログは、
// エディットボックスにIMEからの入力が化けることがある (20/05/27,Windows10 64bit)
// ペーストはok
hDlgWnd = TTCreateDialog(hInst, MAKEINTRESOURCE(IDD_BROADCAST_DIALOG),
hDlgWnd = TTCreateDialog(hInst, MAKEINTRESOURCEW(IDD_BROADCAST_DIALOG),
hWnd, BroadcastCommandDlgProc);

if (hDlgWnd == NULL) {
Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/clipboarddlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ INT_PTR clipboarddlg(
DlgPrivateData *pdata = (DlgPrivateData * )calloc(1, sizeof(DlgPrivateData));
INT_PTR ret;
pdata->data = data;
ret = TTDialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CLIPBOARD_DIALOG),
ret = TTDialogBoxParam(hInstance, MAKEINTRESOURCEW(IDD_CLIPBOARD_DIALOG),
hWndParent, OnClipboardDlgProc, (LPARAM)pdata);
free(pdata);
return ret;
Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/coding_pp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ HPROPSHEETPAGE CodingPageCreate(HINSTANCE inst, TTTSet *pts)
psp.pszTemplate = MAKEINTRESOURCEW(id);
#if defined(REWRITE_TEMPLATE)
psp.dwFlags |= PSP_DLGINDIRECT;
Param->dlg_templ = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(id));
Param->dlg_templ = TTGetDlgTemplate(inst, MAKEINTRESOURCEW(id));
psp.pResource = Param->dlg_templ;
#endif

Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/dnddlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ enum drop_type ShowDropDialogBox(
Param.UILanguageFile = pts->UILanguageFileW;

INT_PTR ret = TTDialogBoxParam(
hInstance, MAKEINTRESOURCE(IDD_DAD_DIALOG),
hInstance, MAKEINTRESOURCEW(IDD_DAD_DIALOG),
hWndParent, (DLGPROC)OnDragDropDlgProc,
(LPARAM)&Param);
if (ret != IDOK) {
Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/filesys_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ void FLogAddCommentDlg(HINSTANCE hInst, HWND hWnd)
if (fv == NULL) {
return;
}
TTDialogBox(hInst, MAKEINTRESOURCE(IDD_COMMENT_DIALOG),
TTDialogBox(hInst, MAKEINTRESOURCEW(IDD_COMMENT_DIALOG),
hWnd, OnCommentDlgProc);
}

Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/filesys_proto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ static BOOL _GetGetFname(HWND HWin, PFileVarProto fv, PTTSet ts)
SetDialogFont(ts->DialogFontNameW, ts->DialogFontPoint, ts->DialogFontCharSet,
ts->UILanguageFileW, "Tera Term", "DLG_SYSTEM_FONT");
return (BOOL)TTDialogBoxParam(hInst,
MAKEINTRESOURCE(IDD_GETFNDLG),
MAKEINTRESOURCEW(IDD_GETFNDLG),
HWin, GetFnDlg, (LPARAM)fv);
}

Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/font_pp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ HPROPSHEETPAGE FontPageCreate(HINSTANCE inst, TTTSet *pts)
psp.pszTemplate = MAKEINTRESOURCEW(id);
#if defined(REWRITE_TEMPLATE)
psp.dwFlags |= PSP_DLGINDIRECT;
Param->dlg_templ = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(id));
Param->dlg_templ = TTGetDlgTemplate(inst, MAKEINTRESOURCEW(id));
psp.pResource = Param->dlg_templ;
#endif

Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/keyboard_pp.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ HPROPSHEETPAGE KeyboardPageCreate(HINSTANCE inst, TTTSet *pts)
psp.pszTemplate = MAKEINTRESOURCEW(id);
#if defined(REWRITE_TEMPLATE)
psp.dwFlags |= PSP_DLGINDIRECT;
Param->dlg_templ = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(id));
Param->dlg_templ = TTGetDlgTemplate(inst, MAKEINTRESOURCEW(id));
psp.pResource = Param->dlg_templ;
#endif

Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/logdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ BOOL FLogOpenDialog(HINSTANCE hInst_, HWND hWnd, FLogDlgInfo_t *info)
work->pts = info->pts;
work->pcv = info->pcv;
INT_PTR ret = TTDialogBoxParam(
hInst_, MAKEINTRESOURCE(IDD_LOGDLG),
hInst_, MAKEINTRESOURCEW(IDD_LOGDLG),
hWnd, LogFnHook, (LPARAM)work);
free(work);
return ret == IDOK ? TRUE : FALSE;
Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/mouse_pp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ HPROPSHEETPAGE MousePageCreate(HINSTANCE inst, TTTSet *pts)
psp.pszTemplate = MAKEINTRESOURCEW(IDD_TABSHEET_MOUSE);
#if defined(REWRITE_TEMPLATE)
psp.dwFlags |= PSP_DLGINDIRECT;
Param->dlg_templ = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(IDD_TABSHEET_MOUSE));
Param->dlg_templ = TTGetDlgTemplate(inst, MAKEINTRESOURCEW(IDD_TABSHEET_MOUSE));
psp.pResource = Param->dlg_templ;
#endif

Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/prnabort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ BOOL CPrnAbortDlg::Create(HINSTANCE hInstance, HWND hParent, PBOOL AbortFlag, PT
SetDialogFont(m_ts->DialogFontNameW, m_ts->DialogFontPoint, m_ts->DialogFontCharSet,
m_ts->UILanguageFileW, "Tera Term", "DLG_SYSTEM_FONT");
HWND hWnd = TTCreateDialogParam(
hInstance, MAKEINTRESOURCE(IDD_PRNABORTDLG), hParent,
hInstance, MAKEINTRESOURCEW(IDD_PRNABORTDLG), hParent,
(DLGPROC)OnDlgProc, (LPARAM)this);
if (hWnd == NULL)
{
Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/sendfiledlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,6 @@ INT_PTR sendfiledlg(HINSTANCE hInstance, HWND hWndParent, sendfiledlgdata *data)
{
INT_PTR ret;
data->method_4 = FALSE;
ret = TTDialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_SENDFILEDLG), hWndParent, SendFileDlgProc, (LPARAM)data);
ret = TTDialogBoxParam(hInstance, MAKEINTRESOURCEW(IDD_SENDFILEDLG), hWndParent, SendFileDlgProc, (LPARAM)data);
return ret;
}
2 changes: 1 addition & 1 deletion teraterm/teraterm/setupdirdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ void SetupDirectoryDialog(HINSTANCE hInst, HWND hWnd, TComVar *pcv)
{
dlg_data_t* dlg_data = (dlg_data_t*)calloc(1, sizeof(dlg_data_t));
dlg_data->pcv = pcv;
TTDialogBoxParam(hInst, MAKEINTRESOURCE(IDD_SETUP_DIR_DIALOG),
TTDialogBoxParam(hInst, MAKEINTRESOURCEW(IDD_SETUP_DIR_DIALOG),
hWnd, OnSetupDirectoryDlgProc, (LPARAM)dlg_data);
free(dlg_data);
}
2 changes: 1 addition & 1 deletion teraterm/teraterm/tcpip_pp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ HPROPSHEETPAGE TcpIPPageCreate(HINSTANCE inst, TTTSet *pts)
psp.pszTemplate = MAKEINTRESOURCEW(IDD_TCPIPDLG);
#if defined(REWRITE_TEMPLATE)
psp.dwFlags |= PSP_DLGINDIRECT;
Param->dlg_templ = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(IDD_TCPIPDLG));
Param->dlg_templ = TTGetDlgTemplate(inst, MAKEINTRESOURCEW(IDD_TCPIPDLG));
psp.pResource = Param->dlg_templ;
#endif

Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/term_pp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ HPROPSHEETPAGE CreateTerminalPP(HINSTANCE inst, HWND vtwin, TTTSet *pts)
psp.pszTemplate = MAKEINTRESOURCEW(id);
#if defined(REWRITE_TEMPLATE)
psp.dwFlags |= PSP_DLGINDIRECT;
psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(id));
psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEW(id));
#endif
psp.pfnDlgProc = TermDlg;
psp.lParam = (LPARAM)data;
Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/theme_pp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ HPROPSHEETPAGE ThemePageCreate(HINSTANCE inst, TTTSet *pts)
psp.pszTemplate = MAKEINTRESOURCEW(id);
#if defined(REWRITE_TEMPLATE)
psp.dwFlags |= PSP_DLGINDIRECT;
Param->dlg_templ = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(id));
Param->dlg_templ = TTGetDlgTemplate(inst, MAKEINTRESOURCEW(id));
psp.pResource = Param->dlg_templ;
#endif

Expand Down
8 changes: 4 additions & 4 deletions teraterm/teraterm/themedlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ static HPROPSHEETPAGE ThemeEditorCreate(ThemeDlgData *dlg_data)
psp.pszTitle = title;
psp.pszTemplate = MAKEINTRESOURCEW(id);
psp.dwFlags |= PSP_DLGINDIRECT;
psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(id));
psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEW(id));

psp.pfnDlgProc = BGThemeProc;
psp.lParam = (LPARAM)dlg_data;
Expand Down Expand Up @@ -813,7 +813,7 @@ static HPROPSHEETPAGE ColorThemeEditorCreate(ThemeDlgData *dlg_data)
psp.pszTemplate = MAKEINTRESOURCEW(id);
#if 1
psp.dwFlags |= PSP_DLGINDIRECT;
psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(id));
psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEW(id));
#endif

psp.pfnDlgProc = ColorThemeProc;
Expand Down Expand Up @@ -1013,7 +1013,7 @@ static HPROPSHEETPAGE ThemeEditorFile(ThemeDlgData* dlg_data)
psp.pszTemplate = MAKEINTRESOURCEW(id);
#if 1
psp.dwFlags |= PSP_DLGINDIRECT;
psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(id));
psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEW(id));
#endif

psp.pfnDlgProc = FileProc;
Expand Down Expand Up @@ -1118,7 +1118,7 @@ static HPROPSHEETPAGE BGAlphaCreate(ThemeDlgData *dlg_data)
psp.pszTemplate = MAKEINTRESOURCEW(id);
#if 1
psp.dwFlags |= PSP_DLGINDIRECT;
psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(id));
psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEW(id));
#endif

psp.pfnDlgProc = BGAlphaProc;
Expand Down
2 changes: 1 addition & 1 deletion teraterm/teraterm/win_pp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ HPROPSHEETPAGE CreateWinPP(HINSTANCE inst, HWND vtwin, TTTSet *pts)
psp.pszTemplate = MAKEINTRESOURCEW(id);
#if defined(REWRITE_TEMPLATE)
psp.dwFlags |= PSP_DLGINDIRECT;
psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEA(id));
psp.pResource = TTGetDlgTemplate(inst, MAKEINTRESOURCEW(id));
#endif
psp.pfnDlgProc = WinDlg;
psp.lParam = (LPARAM)data;
Expand Down
2 changes: 1 addition & 1 deletion teraterm/ttpdlg/aboutdlg.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,6 @@ BOOL WINAPI _AboutDialog(HWND WndParent)
{
return
(BOOL)TTDialogBox(hInst,
MAKEINTRESOURCE(IDD_ABOUTDLG),
MAKEINTRESOURCEW(IDD_ABOUTDLG),
WndParent, AboutDlg);
}
Loading

0 comments on commit edba256

Please sign in to comment.