[Ttssh2-commit] [8567] 印字中ダイアログ整理

scmno****@osdn***** scmno****@osdn*****
2020年 2月 27日 (木) 01:26:42 JST


Revision: 8567
          https://osdn.net/projects/ttssh2/scm/svn/commits/8567
Author:   zmatsuo
Date:     2020-02-27 01:26:42 +0900 (Thu, 27 Feb 2020)
Log Message:
-----------
印字中ダイアログ整理

- CreateDialogIndirectParam() -> TTCreateDialogParam()

Modified Paths:
--------------
    trunk/teraterm/common/dlglib.h
    trunk/teraterm/common/dlglib_cpp.cpp
    trunk/teraterm/teraterm/prnabort.cpp

-------------- next part --------------
Modified: trunk/teraterm/common/dlglib.h
===================================================================
--- trunk/teraterm/common/dlglib.h	2020-02-26 14:27:49 UTC (rev 8566)
+++ trunk/teraterm/common/dlglib.h	2020-02-26 16:26:42 UTC (rev 8567)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2005-2019 TeraTerm Project
+ * (C) 2005-2020 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -71,6 +71,12 @@
 	HWND hWndParent,
 	DLGPROC lpDialogFunc,
 	LPARAM lParamInit);
+HWND TTCreateDialogParam(
+	HINSTANCE hInstance,
+	LPCTSTR lpTemplateName,
+	HWND hWndParent,
+	DLGPROC lpDialogFunc,
+	LPARAM lParamInit);
 HWND TTCreateDialog(
 	HINSTANCE hInstance,
 	LPCTSTR lpTemplateName,

Modified: trunk/teraterm/common/dlglib_cpp.cpp
===================================================================
--- trunk/teraterm/common/dlglib_cpp.cpp	2020-02-26 14:27:49 UTC (rev 8566)
+++ trunk/teraterm/common/dlglib_cpp.cpp	2020-02-26 16:26:42 UTC (rev 8567)
@@ -64,6 +64,20 @@
 }
 
 /**
+ *	CreateDialogParam() \x8C݊\xB7\x8A֐\x94
+ */
+HWND TTCreateDialogParam(
+	HINSTANCE hInstance,
+	LPCTSTR lpTemplateName,
+	HWND hWndParent,
+	DLGPROC lpDialogFunc,
+	LPARAM lParamInit)
+{
+	return TTCreateDialogIndirectParam(hInstance, lpTemplateName,
+									   hWndParent, lpDialogFunc, lParamInit);
+}
+
+/**
  *	CreateDialog() \x8C݊\xB7\x8A֐\x94
  */
 HWND TTCreateDialog(
@@ -72,8 +86,8 @@
 	HWND hWndParent,
 	DLGPROC lpDialogFunc)
 {
-	return TTCreateDialogIndirectParam(hInstance, lpTemplateName,
-									   hWndParent, lpDialogFunc, NULL);
+	return TTCreateDialogParam(hInstance, lpTemplateName,
+							   hWndParent, lpDialogFunc, NULL);
 }
 
 /**

Modified: trunk/teraterm/teraterm/prnabort.cpp
===================================================================
--- trunk/teraterm/teraterm/prnabort.cpp	2020-02-26 14:27:49 UTC (rev 8566)
+++ trunk/teraterm/teraterm/prnabort.cpp	2020-02-26 16:26:42 UTC (rev 8567)
@@ -40,7 +40,7 @@
 LRESULT CALLBACK CPrnAbortDlg::OnDlgProc(HWND hDlgWnd, UINT msg, WPARAM wp, LPARAM lp)
 {
 	static const DlgTextInfo TextInfos[] = {
-		{ IDC_PRNABORT_PRINTING, "DLG_PRNABORT_PRINTING" }, 
+		{ IDC_PRNABORT_PRINTING, "DLG_PRNABORT_PRINTING" },
 		{ IDCANCEL, "BTN_CANCEL" },
 	};
 
@@ -84,11 +84,9 @@
 
 	SetDialogFont(m_ts->DialogFontName, m_ts->DialogFontPoint, m_ts->DialogFontCharSet,
 				  m_ts->UILanguageFile, "Tera Term", "DLG_SYSTEM_FONT");
-	DLGTEMPLATE *lpTemplate = TTGetDlgTemplate(hInstance, MAKEINTRESOURCE(IDD_PRNABORTDLG));
-	HWND hWnd = ::CreateDialogIndirectParam(
-		hInstance, lpTemplate, hParent,
+	HWND hWnd = TTCreateDialogParam(
+		hInstance, MAKEINTRESOURCE(IDD_PRNABORTDLG), hParent,
 		(DLGPROC)OnDlgProc, (LPARAM)this);
-	free(lpTemplate);
 	if (hWnd == NULL)
 	{
 		return FALSE;


Ttssh2-commit メーリングリストの案内