[Ttssh2-commit] [8331] 一部のWindowsバージョンで、印刷ダイアログにヘルプボタンが表示されないことがある問題を修正した。

scmno****@osdn***** scmno****@osdn*****
2019年 10月 26日 (土) 00:01:20 JST


Revision: 8331
          https://osdn.net/projects/ttssh2/scm/svn/commits/8331
Author:   yutakapon
Date:     2019-10-26 00:01:20 +0900 (Sat, 26 Oct 2019)
Log Message:
-----------
一部のWindowsバージョンで、印刷ダイアログにヘルプボタンが表示されないことがある問題を修正した。

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/ja/html/about/history.html
    trunk/teraterm/teraterm/teraprn.cpp

-------------- next part --------------
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2019-10-25 11:31:34 UTC (rev 8330)
+++ trunk/doc/en/html/about/history.html	2019-10-25 15:01:20 UTC (rev 8331)
@@ -69,6 +69,7 @@
       <li>Eterm look-feel: When a image file is randomly selected with the wallpaper, invalid file may be selected. </li>
       <li>The help button of File-Log, File-Trasnfer, Setup-Font and Printer dialog does not work well. This bug was introduced in 4.104.</li>
       <li>Fixed a problem that TTIMESV (Save IME status) / TTIMERS (Restore IME status) control sequences do not work.</li>
+      <li>The help button on the printer dialog may not be shown on some Windows version.</li>
     </ul>
   </li>
 

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2019-10-25 11:31:34 UTC (rev 8330)
+++ trunk/doc/ja/html/about/history.html	2019-10-25 15:01:20 UTC (rev 8331)
@@ -69,6 +69,7 @@
       <li>Eterm look-feel: \x95ǎ\x86\x82ƍ\xAC\x8D\x87\x82\xB7\x82\xE9\x89摜\x83t\x83@\x83C\x83\x8B\x82\xF0\x83\x89\x83\x93\x83_\x83\x80\x82ɑI\x91\xF0\x82\xB7\x82\xE9\x8DہA\x96\xB3\x8A֌W\x82ȃt\x83@\x83C\x83\x8B\x82\xF0\x91I\x91\xF0\x82\xB7\x82邱\x82Ƃ\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
       <li>\x83\x8D\x83O\x8D̎\xE6\x81E\x83t\x83@\x83C\x83\x8B\x91\x97\x90M\x81E\x83t\x83H\x83\x93\x83g\x81E\x88\xF3\x8D\xFC\x83_\x83C\x83A\x83\x8D\x83O\x82̃w\x83\x8B\x83v\x83{\x83^\x83\x93\x82\xAA\x8B@\x94\\x82\xB5\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B4.104\x82ł̃G\x83\x93\x83o\x83O\x81B</li>
       <li>TTIMESV(IME\x8F\xF3\x91ԕۑ\xB6)/TTIMERS(IME\x8F\xF3\x91ԕ\x9C\x8C\xB3)\x90\xA7\x8C\xE4\x83V\x81[\x83P\x83\x93\x83X\x82\xAA\x90\xB3\x82\xB5\x82\xAD\x93\xAE\x82\xA9\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>\x88ꕔ\x82\xCCWindows\x83o\x81[\x83W\x83\x87\x83\x93\x82ł́A\x88\xF3\x8D\xFC\x83_\x83C\x83A\x83\x8D\x83O\x82Ƀw\x83\x8B\x83v\x83{\x83^\x83\x93\x82\xAA\x95\\x8E\xA6\x82\xB3\x82\xEA\x82Ȃ\xA2\x82\xB1\x82Ƃ\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
 

Modified: trunk/teraterm/teraterm/teraprn.cpp
===================================================================
--- trunk/teraterm/teraterm/teraprn.cpp	2019-10-25 11:31:34 UTC (rev 8330)
+++ trunk/teraterm/teraterm/teraprn.cpp	2019-10-25 15:01:20 UTC (rev 8331)
@@ -97,6 +97,11 @@
 	}
 }
 
+static UINT_PTR CALLBACK PrintHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
+{
+	return 0;
+}
+
 HDC PrnBox(HWND HWin, PBOOL Sel)
 {
 	/* initialize PrnDlg record */
@@ -103,7 +108,7 @@
 	memset(&PrnDlg, 0, sizeof(PRINTDLG));
 	PrnDlg.lStructSize = sizeof(PRINTDLG);
 	PrnDlg.hwndOwner = HWin;
-	PrnDlg.Flags = PD_RETURNDC | PD_NOPAGENUMS | PD_SHOWHELP;
+	PrnDlg.Flags = PD_RETURNDC | PD_NOPAGENUMS | PD_SHOWHELP | PD_ENABLEPRINTHOOK;
 	if (! *Sel) {
 		PrnDlg.Flags = PrnDlg.Flags | PD_NOSELECTION;	/* when there is nothing select, gray out the "Selection" radio button */
 	} else {
@@ -110,6 +115,11 @@
 		PrnDlg.Flags = PrnDlg.Flags | PD_SELECTION;	/* when there is something select, select the "Selection" radio button by default */
 	}
 	PrnDlg.nCopies = 1;
+	/*
+	 * Windows NT\x8Cn\x82ɂ\xA8\x82\xA2\x82āA\x88\xF3\x8D\xFC\x83_\x83C\x83A\x83\x8D\x83O\x82Ƀw\x83\x8B\x83v\x83{\x83^\x83\x93\x82\xF0\x95\\x8E\xA6\x82\xB7\x82邽\x82߁A
+	 * \x83v\x83\x8D\x83V\x81[\x83W\x83\x83\x82\xF0\x83t\x83b\x83N\x82\xB7\x82\xE9\x81B
+	 */
+	PrnDlg.lpfnPrintHook = PrintHookProc;
 
 	/* 'Print' dialog box */
 	if (! PrintDlg(&PrnDlg)) {


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