[Ttssh2-commit] [7936] 印字中止ダイアログがダイアログフォントの設定どおりになるよう修正

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 8月 10日 (土) 16:32:44 JST


Revision: 7936
          https://osdn.net/projects/ttssh2/scm/svn/commits/7936
Author:   zmatsuo
Date:     2019-08-10 16:32:44 +0900 (Sat, 10 Aug 2019)
Log Message:
-----------
印字中止ダイアログがダイアログフォントの設定どおりになるよう修正

- ダイアログフォントの設定を考慮していなかった
- teraterm/teraprn.cpp 未使用変数、マクロ削除、debug用new設定

Modified Paths:
--------------
    trunk/teraterm/teraterm/prnabort.cpp
    trunk/teraterm/teraterm/prnabort.h
    trunk/teraterm/teraterm/teraprn.cpp

-------------- next part --------------
Modified: trunk/teraterm/teraterm/prnabort.cpp
===================================================================
--- trunk/teraterm/teraterm/prnabort.cpp	2019-08-10 07:32:33 UTC (rev 7935)
+++ trunk/teraterm/teraterm/prnabort.cpp	2019-08-10 07:32:44 UTC (rev 7936)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2007-2018 TeraTerm Project
+ * (C) 2007-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -82,12 +82,13 @@
 	m_hParentWnd = hParent;
 	m_ts = pts;
 
-	HRSRC hResource = ::FindResource(hInstance, MAKEINTRESOURCE(IDD_PRNABORTDLG), RT_DIALOG);
-	HANDLE hDlgTemplate = ::LoadResource(hInstance, hResource);
-	DLGTEMPLATE *lpTemplate = (DLGTEMPLATE *)::LockResource(hDlgTemplate);
-	HWND hWnd = ::CreateDialogIndirectParam(	
+	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,
 		(DLGPROC)OnDlgProc, (LPARAM)this);
+	free(lpTemplate);
 	if (hWnd == NULL)
 	{
 		return FALSE;

Modified: trunk/teraterm/teraterm/prnabort.h
===================================================================
--- trunk/teraterm/teraterm/prnabort.h	2019-08-10 07:32:33 UTC (rev 7935)
+++ trunk/teraterm/teraterm/prnabort.h	2019-08-10 07:32:44 UTC (rev 7936)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2007-2018 TeraTerm Project
+ * (C) 2007-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,6 @@
 class CPrnAbortDlg
 {
 public:
-	HWND m_hWnd;
 	HWND GetSafeHwnd() const {return m_hWnd;}
 	BOOL Create(HINSTANCE hInstance, HWND hParent, PBOOL AbortFlag, PTTSet pts);
 	BOOL DestroyWindow();
@@ -44,6 +43,7 @@
 private:
 	void OnCancel();
 	void PostNcDestroy();
+	HWND m_hWnd;
 	HWND m_hParentWnd;
 	BOOL *m_pAbort;
 	TTTSet *m_ts;

Modified: trunk/teraterm/teraterm/teraprn.cpp
===================================================================
--- trunk/teraterm/teraterm/teraprn.cpp	2019-08-10 07:32:33 UTC (rev 7935)
+++ trunk/teraterm/teraterm/teraprn.cpp	2019-08-10 07:32:44 UTC (rev 7936)
@@ -32,6 +32,7 @@
 #include "tttypes.h"
 #include <commdlg.h>
 #include <stdio.h>
+#include <crtdbg.h>
 
 #include "ttwinman.h"
 #include "commlib.h"
@@ -45,14 +46,12 @@
 
 #include "teraprn.h"
 
-#if 0 //def _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
+#ifdef _DEBUG
+#if defined(_MSC_VER)
+#define new		::new(_NORMAL_BLOCK, __FILE__, __LINE__)
 #endif
+#endif
 
-#define CWnd TTCWnd
-
 static PRINTDLG PrnDlg;
 
 static HDC PrintDC;


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