[Ttssh2-commit] [8253] Merge 'trunk' into unicode_buf

scmno****@osdn***** scmno****@osdn*****
2019年 10月 3日 (木) 00:09:00 JST


Revision: 8253
          https://osdn.net/projects/ttssh2/scm/svn/commits/8253
Author:   zmatsuo
Date:     2019-10-03 00:09:00 +0900 (Thu, 03 Oct 2019)
Log Message:
-----------
Merge 'trunk' into unicode_buf

Modified Paths:
--------------
    branches/unicode_buf/TTProxy/CMakeLists.txt
    branches/unicode_buf/TTProxy/ProxyWSockHook.h
    branches/unicode_buf/doc/en/html/about/history.html
    branches/unicode_buf/doc/en/html/commandline/teraterm.html
    branches/unicode_buf/doc/en/html/menu/setup-serialport.html
    branches/unicode_buf/doc/en/html/reference/develop.txt
    branches/unicode_buf/doc/ja/html/about/history.html
    branches/unicode_buf/doc/ja/html/commandline/teraterm.html
    branches/unicode_buf/doc/ja/html/menu/setup-serialport.html
    branches/unicode_buf/doc/ja/html/reference/develop.txt
    branches/unicode_buf/installer/release/lang/English.lng
    branches/unicode_buf/installer/release/lang/French.lng
    branches/unicode_buf/installer/release/lang/German.lng
    branches/unicode_buf/installer/release/lang/Japanese.lng
    branches/unicode_buf/installer/release/lang/Korean.lng
    branches/unicode_buf/installer/release/lang/Russian.lng
    branches/unicode_buf/installer/release/lang/Simplified Chinese.lng
    branches/unicode_buf/installer/release/lang/Traditional Chinese.lng
    branches/unicode_buf/teraterm/common/i18n.c
    branches/unicode_buf/teraterm/common/i18n.h
    branches/unicode_buf/teraterm/common/tipwin.cpp
    branches/unicode_buf/teraterm/common/tipwin.h
    branches/unicode_buf/teraterm/common/tmfc.cpp
    branches/unicode_buf/teraterm/common/tmfc.h
    branches/unicode_buf/teraterm/common/ttlib.c
    branches/unicode_buf/teraterm/common/ttlib.h
    branches/unicode_buf/teraterm/common/tttypes.h
    branches/unicode_buf/teraterm/teraterm/CMakeLists.txt
    branches/unicode_buf/teraterm/teraterm/addsetting.cpp
    branches/unicode_buf/teraterm/teraterm/addsetting.h
    branches/unicode_buf/teraterm/teraterm/filesys.cpp
    branches/unicode_buf/teraterm/teraterm/ftdlg.cpp
    branches/unicode_buf/teraterm/teraterm/sizetip.c
    branches/unicode_buf/teraterm/teraterm/tekwin.cpp
    branches/unicode_buf/teraterm/teraterm/tekwin.h
    branches/unicode_buf/teraterm/teraterm/ttermpro.rc
    branches/unicode_buf/teraterm/teraterm/ttermpro.v10.vcxproj
    branches/unicode_buf/teraterm/teraterm/ttermpro.v11.vcxproj
    branches/unicode_buf/teraterm/teraterm/ttermpro.v12.vcxproj
    branches/unicode_buf/teraterm/teraterm/ttermpro.v14.vcxproj
    branches/unicode_buf/teraterm/teraterm/ttermpro.v15.vcxproj
    branches/unicode_buf/teraterm/teraterm/ttermpro.v15.vcxproj.filters
    branches/unicode_buf/teraterm/teraterm/ttermpro.v16.vcxproj
    branches/unicode_buf/teraterm/teraterm/ttermpro.v16.vcxproj.filters
    branches/unicode_buf/teraterm/teraterm/ttermpro.v9.vcproj
    branches/unicode_buf/teraterm/teraterm/ttermpro.vcproj
    branches/unicode_buf/teraterm/teraterm/ttsetup.h
    branches/unicode_buf/teraterm/teraterm/ttwinman.c
    branches/unicode_buf/teraterm/teraterm/ttwinman.h
    branches/unicode_buf/teraterm/teraterm/vtwin.cpp
    branches/unicode_buf/teraterm/teraterm/vtwin.h
    branches/unicode_buf/teraterm/ttpcmn/CMakeLists.txt
    branches/unicode_buf/teraterm/ttpcmn/ttcmn.c
    branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v10.vcxproj
    branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v11.vcxproj
    branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v12.vcxproj
    branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v14.vcxproj
    branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v15.vcxproj
    branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v15.vcxproj.filters
    branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v16.vcxproj
    branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v16.vcxproj.filters
    branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v9.vcproj
    branches/unicode_buf/teraterm/ttpcmn/ttpcmn.vcproj
    branches/unicode_buf/teraterm/ttpdlg/dlg_res.h
    branches/unicode_buf/teraterm/ttpdlg/ttdlg.c
    branches/unicode_buf/teraterm/ttpdlg/ttpdlg.rc
    branches/unicode_buf/teraterm/ttpmacro/CMakeLists.txt
    branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v10.vcxproj
    branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v11.vcxproj
    branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v12.vcxproj
    branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v14.vcxproj
    branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v15.vcxproj
    branches/unicode_buf/teraterm/ttpset/ttpset.def
    branches/unicode_buf/teraterm/ttpset/ttset.c
    branches/unicode_buf/ttssh2/ttxssh/CMakeLists.txt
    branches/unicode_buf/ttssh2/ttxssh/auth.c
    branches/unicode_buf/ttssh2/ttxssh/fwd.c
    branches/unicode_buf/ttssh2/ttxssh/fwdui.c
    branches/unicode_buf/ttssh2/ttxssh/hosts.c
    branches/unicode_buf/ttssh2/ttxssh/ssh.c
    branches/unicode_buf/ttssh2/ttxssh/ttxssh.c

Added Paths:
-----------
    branches/unicode_buf/teraterm/ttpcmn/comportinfo.cpp
    branches/unicode_buf/teraterm/ttpcmn/comportinfo.h
    branches/unicode_buf/teraterm/ttpcmn/devpkey_teraterm.h
    branches/unicode_buf/tests/#39614-portforward.rb

-------------- next part --------------
Modified: branches/unicode_buf/TTProxy/CMakeLists.txt
===================================================================
--- branches/unicode_buf/TTProxy/CMakeLists.txt	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/TTProxy/CMakeLists.txt	2019-10-02 15:09:00 UTC (rev 8253)
@@ -8,6 +8,10 @@
 
 include(${CMAKE_CURRENT_SOURCE_DIR}/../libs/lib_openssl.cmake)
 
+if (MSVC)
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DELAYLOAD:user32.dll")
+endif()
+
 set(COMMON_SRC
   ../teraterm/common/ttlib.h
   ../teraterm/common/ttlib.c

Modified: branches/unicode_buf/TTProxy/ProxyWSockHook.h
===================================================================
--- branches/unicode_buf/TTProxy/ProxyWSockHook.h	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/TTProxy/ProxyWSockHook.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -750,58 +750,30 @@
             return Dialog::dispatch(message, wParam, lParam);
         }
         virtual bool onInitDialog() {
-            char uimsg[MAX_UIMSG], uitmp[MAX_UIMSG];
+            const static DlgTextInfo text_info[] = {
+                { 0, "DLG_OTHER_TITLE" },
+                { IDC_GRP_COMMON, "DLG_OTHER_COMMON" },
+                { IDC_TIMEOUT_LABEL, "DLG_OTHER_TIMEOUT" },
+                { IDC_TIMEOUT_SECONDS, "DLG_OTHER_SECOND" },
+                { IDC_LOGFILE_LABEL, "DLG_OTHER_LOG" },
+                { IDC_REFER, "DLG_OTHER_REFER" },
+                { IDC_GRP_SOCKS, "DLG_OTHER_SOCKS" },
+                { IDC_RESOLVE_LABEL, "DLG_OTHER_RESOLV" },
+                { IDC_GRP_TELNET, "DLG_OTHER_TELNET" },
+                { IDC_HOSTNAME_LABEL, "DLG_OTHER_HOST" },
+                { IDC_USERNAME_LABEL, "DLG_OTHER_USER" },
+                { IDC_PASSWORD_LABEL, "DLG_OTHER_PASS" },
+                { IDC_CONNECTED_LABEL, "DLG_OTHER_CONNECT" },
+                { IDC_ERROR_LABEL, "DLG_OTHER_ERROR" },
+//              { IDOK, "BTN_OK" },
+//              { IDCANCEL, "BTN_CANCEL" },
+            };
+            char uimsg[MAX_UIMSG];
 
             Dialog::onInitDialog();
 
-            GetWindowText(uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_TITLE", uimsg, sizeof(uimsg), uitmp);
-            SetWindowText(uimsg);
-            GetDlgItemText(IDC_GRP_COMMON, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_COMMON", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_GRP_COMMON, uimsg);
-            GetDlgItemText(IDC_TIMEOUT_LABEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_TIMEOUT", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_TIMEOUT_LABEL, uimsg);
-            GetDlgItemText(IDC_TIMEOUT_SECONDS, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_SECOND", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_TIMEOUT_SECONDS, uimsg);
-            GetDlgItemText(IDC_LOGFILE_LABEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_LOG", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_LOGFILE_LABEL, uimsg);
-            GetDlgItemText(IDC_REFER, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_REFER", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_REFER, uimsg);
-            GetDlgItemText(IDC_GRP_SOCKS, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_SOCKS", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_GRP_SOCKS, uimsg);
-            GetDlgItemText(IDC_RESOLVE_LABEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_RESOLV", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_RESOLVE_LABEL, uimsg);
-            GetDlgItemText(IDC_GRP_TELNET, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_TELNET", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_GRP_TELNET, uimsg);
-            GetDlgItemText(IDC_HOSTNAME_LABEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_HOST", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_HOSTNAME_LABEL, uimsg);
-            GetDlgItemText(IDC_USERNAME_LABEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_USER", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_USERNAME_LABEL, uimsg);
-            GetDlgItemText(IDC_PASSWORD_LABEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_PASS", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_PASSWORD_LABEL, uimsg);
-            GetDlgItemText(IDC_CONNECTED_LABEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_CONNECT", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_CONNECTED_LABEL, uimsg);
-            GetDlgItemText(IDC_ERROR_LABEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_OTHER_ERROR", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_ERROR_LABEL, uimsg);
-            GetDlgItemText(IDOK, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("BTN_OK", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDOK, uimsg);
-            GetDlgItemText(IDCANCEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("BTN_CANCEL", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDCANCEL, uimsg);
+            HWND hWnd = (HWND)this;
+			SetI18DlgStrs("TTProxy", hWnd, text_info, _countof(text_info), UILanguageFile);
 
             host = GetDlgItem(IDC_HOSTNAME);
             user = GetDlgItem(IDC_USERNAME);
@@ -910,40 +882,24 @@
             return Dialog::dispatch(message, wParam, lParam);
         }
         virtual bool onInitDialog() {
-            char uimsg[MAX_UIMSG], uitmp[MAX_UIMSG];
+            char uimsg[MAX_UIMSG];
 
             Dialog::onInitDialog();
 
-            GetWindowText(uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_SETUP_TITLE", uimsg, sizeof(uimsg), uitmp);
-            SetWindowText(uimsg);
-            GetDlgItemText(IDC_URL_LABEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_SETUP_URL", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_URL_LABEL, uimsg);
-            GetDlgItemText(IDC_TYPE_LEBEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_SETUP_TYPE", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_TYPE_LEBEL, uimsg);
-            GetDlgItemText(IDC_HOSTNAME_LABEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_SETUP_HOST", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_HOSTNAME_LABEL, uimsg);
-            GetDlgItemText(IDC_PORT_LABEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_SETUP_PORT", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_PORT_LABEL, uimsg);
-            GetDlgItemText(IDC_USERNAME_LABEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_SETUP_USER", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_USERNAME_LABEL, uimsg);
-            GetDlgItemText(IDC_PASSWORD_LABEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_SETUP_PASS", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_PASSWORD_LABEL, uimsg);
-            GetDlgItemText(IDC_OPTIONS, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("DLG_SETUP_OTHER", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDC_OPTIONS, uimsg);
-            GetDlgItemText(IDOK, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("BTN_OK", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDOK, uimsg);
-            GetDlgItemText(IDCANCEL, uitmp, sizeof(uitmp));
-            UTIL_get_lang_msg("BTN_CANCEL", uimsg, sizeof(uimsg), uitmp);
-            SetDlgItemText(IDCANCEL, uimsg);
+            const static DlgTextInfo text_info[] = {
+                { 0, "DLG_SETUP_TITLE" },
+                { IDC_URL_LABEL, "DLG_SETUP_URL" },
+                { IDC_TYPE_LEBEL, "DLG_SETUP_TYPE" },
+                { IDC_HOSTNAME_LABEL, "DLG_SETUP_HOST" },
+                { IDC_PORT_LABEL, "DLG_SETUP_PORT" },
+                { IDC_USERNAME_LABEL, "DLG_SETUP_USER" },
+                { IDC_PASSWORD_LABEL, "DLG_SETUP_PASS" },
+                { IDC_OPTIONS, "DLG_SETUP_OTHER" },
+//              { IDOK, "BTN_OK" },
+//              { IDCANCEL, "BTN_CANCEL" },
+            };
+			HWND hWnd = HWND(this);		// \x82\xA4\x82܂\xAD\x93\xAE\x82\xA9\x82Ȃ\xA2?
+			SetI18DlgStrs("TTProxy", hWnd, text_info, _countof(text_info), UILanguageFile);
 
             url  <<= GetDlgItem(IDC_URL);
             type <<= GetDlgItem(IDC_TYPE);
@@ -1539,22 +1495,22 @@
 		   
 		   buf[0] VER  protocol version: X'05'
 		   buf[1] REP  Reply field: 
- 				 o  X'00' succeeded
-				 o  X'01' general SOCKS server failure
-				 o  X'02' connection not allowed by ruleset
-				 o  X'03' Network unreachable
-				 o  X'04' Host unreachable
-				 o  X'05' Connection refused
-				 o  X'06' TTL expired
-				 o  X'07' Command not supported
-				 o  X'08' Address type not supported
-				 o  X'09' to X'FF' unassigned
-		   buf[2] RSV    RESERVED: X'00'
-		   buf[3] ATYP   address type of following address
-				 o  IP V4 address: X'01'
-				 o  DOMAINNAME: X'03'
-				 o  IP V6 address: X'04'
-		   buf[4:N] BND.ADDR       server bound address
+ 				 o  X'00' succeeded
+				 o  X'01' general SOCKS server failure
+				 o  X'02' connection not allowed by ruleset
+				 o  X'03' Network unreachable
+				 o  X'04' Host unreachable
+				 o  X'05' Connection refused
+				 o  X'06' TTL expired
+				 o  X'07' Command not supported
+				 o  X'08' Address type not supported
+				 o  X'09' to X'FF' unassigned
+		   buf[2] RSV    RESERVED: X'00'
+		   buf[3] ATYP   address type of following address
+				 o  IP V4 address: X'01'
+				 o  DOMAINNAME: X'03'
+				 o  IP V6 address: X'04'
+		   buf[4:N] BND.ADDR       server bound address
 		   buf[N+1] BND.PORT       server bound port in network octet order 
 		 */
         if (buf[0] != SOCKS5_VERSION || buf[1] != SOCKS5_REP_SUCCEEDED) {   /* check reply code */
@@ -1667,9 +1623,9 @@
 		  buf[1] CD
 		           90 request granted
 		           91 request rejected or failed
-		           92 request rejected becasue SOCKS server cannot connect to
+		           92 request rejected becasue SOCKS server cannot connect to
 	                  identd on the client
-				   93 request rejected because the client program and identd
+				   93 request rejected because the client program and identd
 	                  report different user-ids
 		  buf[2:3] DSTPORT \x83|\x81[\x83g\x94ԍ\x86
 		  buf[4:7] DSTIP   IP\x83A\x83h\x83\x8C\x83X

Modified: branches/unicode_buf/doc/en/html/about/history.html
===================================================================
--- branches/unicode_buf/doc/en/html/about/history.html	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/doc/en/html/about/history.html	2019-10-02 15:09:00 UTC (rev 8253)
@@ -38,7 +38,7 @@
       <li>Added support for hardware flow control DSR/DTR with serial connection.
         <ul>
           <li>The hardware is renamed to RTS/CTS, and DSR/DTR is newly added on the Flow control of <a href="../menu/setup-serialport.html">Serial port ([Setup] menu)</a>.</li>
-          <li>MARCO: The DSR/DRT can be specified in <a href="../macro/command/setflowctrl.html">setflowctrl</a> command.</li>
+          <li>MACRO: The DSR/DTR can be specified in <a href="../macro/command/setflowctrl.html">setflowctrl</a> command.</li>
         </ul></li>
       <li>Added SFMT information on version dialog.</li>
       <li>Changed of indication from "Protocol" to "IP version" and from "UNSPEC" to "AUTO" on <a href="../menu/file-new.html">New connection dialog</a>.</li>
@@ -46,6 +46,13 @@
       <li>The location of resizing toolchip is automatically moved to coordinates after resizing.</li>
       <li>Added slider for specify the opacity values on the Visual tab of the <a href="../menu/setup-additional.html">Additional settings dialog</a>.</li>
       <li>Eterm look-feel: Added the <a href="../menu/setup-additional.html#MixedThemeFile">Mixed ThemeFile to Background</a> configuration. Also, added the the <a href="../setup/teraterm-ini.html#BGIgnoreThemeFile">BGIgnoreThemeFile</a> entry in the teraterm.ini file. The default value is off.</li>
+      <li>The <a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> dialog can be called even while TCP/IP connection.</li>
+      <li>The title of <a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> dialog is changed from "Serial port setup" to "Serial port setup and connection".</li>
+      <li>The detail information of COM port is added on the <a href="../menu/setup-serialport.html#Information">[Setup]-[Serial port]</a> dialog.</li>
+      <li>The tooltip of the speed setting is added on the <a href="../menu/setup-serialport.html#Information">[Setup]-[Serial port]</a> dialog.</li>
+      <li>The OK button notation in the <a href="../menu/setup-serialport.html#OK">[Setup]-[Serial port]</a> dialog is changed refering to the connection state. </li>
+      <li>The OK button can not be pressed in the <a href="../menu/setup-serialport.html#OK">[Setup]-[Serial port]</a> dialog when no COM ports are available.</li>
+      <li>Added <a href="../commandline/teraterm.html#cdatabit">/CDATABIT=</a>,  <a href="../commandline/teraterm.html#cparity">/CPARITY=</a>, <a href="../commandline/teraterm.html#cstopbit">/CSTOPBIT=</a>, <a href="../commandline/teraterm.html#cflowctrl">/CFLOWCTRL=</a>, <a href="../commandline/teraterm.html#cdelayperchar">/CDELAYPERCHAR=</a>, <a href="../commandline/teraterm.html#cdelayperline">/CDELAYPERLINE=</a> command line options.</li>
     </ul>
   </li>
   <li>Bug fixes
@@ -52,6 +59,7 @@
     <ul>
       <li>The toolchip during resizing can not be displayed on the left and top edge of the desktop. This bug was introduced in 4.103.</li>
       <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, and Setup-Font dialog does not work well. This bug was introduced in 4.104.</li>
     </ul>
   </li>
 
@@ -71,7 +79,7 @@
       <li>The environment variable included in <a href="../menu/file-chdir.html">directory for file transfers</a> becomes to be expanded.</li>
       <li>Unspecified string font in IME uses your defined font.</li>
       <li>Added help button on Additional settings dialog.</li>
-      <li>MARCO: The <a href="../macro/command/fileopen.html">fileopen</a> command does not cause an error when a file can not be opened. Reverted changes in 4.102.</li>
+      <li>MACRO: The <a href="../macro/command/fileopen.html">fileopen</a> command does not cause an error when a file can not be opened. Reverted changes in 4.102.</li>
       <li>MACRO: When <a href="../macro/command/filetruncate.html">filetruncate</a> command does not cause an error when a file can not be opened, or file size can not be changed.</li>
     </ul>
   </li>
@@ -147,7 +155,7 @@
       <li>The language code(CodePage) of the "<a href="../menu/setup-terminal.html">Terminal ([Setup] menu)</a>" dialog(<a href="../usage/unicode.html">Unicode usage</a>).</li>
       <li>MACRO: The macro file can support UTF-8 and UTF-16(with BOM) encoding.</li>
       <li>MACRO: The <a href="../macro/command/getfileattr.html">getfileattr</a> command can be based on the current directory same as other command.</li>
-      <li>MARCO: The <a href="../macro/command/fileopen.html">fileopen</a> command can cause an error when a file is not found with read only mode.</li>
+      <li>MACRO: The <a href="../macro/command/fileopen.html">fileopen</a> command can cause an error when a file is not found with read only mode.</li>
     </ul>
   </li>
 
@@ -707,7 +715,7 @@
       <li>YMODEM: When the received file information contains only a file name, an end of the file name is broken.</li>
       <li>YMODEM: When the received file information does not include the file size, the file data can not be recorded well.</li>
       <li>The setting value of the <a href="../menu/setup-additional.html#LogRotate">Log Rotate</a> will not display well.</li>
-      <li>When the x=0,y=0 is specified by the <a href="../macro/command/setdlgpos.html">setdlgpos</a> marco command, the <a href="../macro/command/statusbox.html">statusbox</a> will be newly opened and however the statusbox can not be properly shown.</li>
+      <li>When the x=0,y=0 is specified by the <a href="../macro/command/setdlgpos.html">setdlgpos</a> macro command, the <a href="../macro/command/statusbox.html">statusbox</a> will be newly opened and however the statusbox can not be properly shown.</li>
       <li>When the macro filename is so longer, the currently executing line number can not be shown. And also, the macro window can be re-sizable.</li>
     </ul>
   </li>
@@ -1015,7 +1023,7 @@
           <li>added the 4th argument(current directory) at the <a href="../macro/command/exec.html">exec</a> command.</li>
           <li>The '<a href="../macro/command/show.html">show</a> 1' command brings the macro window to the top.</li>
           <li>The <a href="../macro/command/messagebox.html">messagebox</a>, <a href="../macro/command/inputbox.html">inputbox</a> and <a href="../macro/command/listbox.html">listbox</a> commands bring the macro dialog to the top.</li>
-          <li>The <a href="../macro/command/wait.html">wait</a>, <a href="../macro/command/waitln.html">waitln</a> and <a href="../marco/command/waitregex.html">waitregex</a> commands can wait an empty strings.</li>
+          <li>The <a href="../macro/command/wait.html">wait</a>, <a href="../macro/command/waitln.html">waitln</a> and <a href="../macro/command/waitregex.html">waitregex</a> commands can wait an empty strings.</li>
           <li>When the <a href="../macro/command/waitregex.html">waitregex</a> command matches some parameters at the same time, the first matched parameter is selected.</li>
         </ul></li>
     </ul>
@@ -1033,8 +1041,8 @@
       <li>The URL string on the mouse hand cursor shifts to the left with half character by mistake.</li>
       <li>MACRO: The send/sendln command can be affected by the <a href="../menu/setup-additional.html#PasteDelayPerLine">Paste delay per line</a> configuration.</li>
       <li>MACRO: When the timeout is 0, the <a href="../macro/command/waitn.html">waitn</a> command can not wait any character.</li>
-      <li>MARCO: When the break command is executed after the continue command, the Invalid Control error will be occurred.</li>
-      <li>MARCO: The box-style macro command can not show the dialog position well on the multi display.</li>
+      <li>MACRO: When the break command is executed after the continue command, the Invalid Control error will be occurred.</li>
+      <li>MACRO: The box-style macro command can not show the dialog position well on the multi display.</li>
       <li>MACRO: The <a href="../macro/command/wait.html">wait</a> and <a href="../macro/command/waitln.html">waitln</a> command can not detect the right string.(ex. wait "aab" does not work against "aaab")</li>
     </ul>
   </li>
@@ -3214,6 +3222,9 @@
       <li>The same messages may be included on MessageBox displaying.</li>
       <li>When the network is disconnected from SSH server side, an application fault may be occurred while known_hosts dialog is shown.</li>
       <li>SSH1: The <a href="../commandline/ttssh.html#nosecuritywarning">/nosecuritywarning</a> option does not work well.</li>
+      <li>The problem is improved in the user authentication dialog that the delay occurs when the focus is moved from the user name to passphrase by using TAB key after entering the user name.</li>
+      <li>When the user name is left blank in the user authentication dialog, the focus may not be moved from the user name to the pull-down menu on the right side with TAB key.</li>
+      <li>Fixed a port forwarding issue that closes the client connection before completing all data transmission.</li>
     </ul>
   </li>
 </ul>
@@ -3236,11 +3247,11 @@
     </ul>
   </li>
 
-  <!--li>Misc
+  <li>Misc
     <ul>
-      <li></li>
+      <li>upgraded OpenSSL to 1.0.2t.</li>
     </ul>
-  </li-->
+  </li>
 </ul>
 
 <h3 id="ttssh_2.89">2019.06.15 (Ver 2.89)</h3>

Modified: branches/unicode_buf/doc/en/html/commandline/teraterm.html
===================================================================
--- branches/unicode_buf/doc/en/html/commandline/teraterm.html	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/doc/en/html/commandline/teraterm.html	2019-10-02 15:09:00 UTC (rev 8253)
@@ -76,6 +76,59 @@
       By default, maximum serial port number is 256. It is configurable in <a href="../setup/teraterm-com.html#maxport">MaxComPort</a> setting.
       </dd>
 
+  <dt id="cdatabit">/CDATABIT=<value></dt>
+  <dd>Data bit of serial port
+      <ul>
+        <li><span class="syntax">/CDATABIT=7</span> 7bit</li>
+        <li><span class="syntax">/CDATABIT=8</span> 8bit</li>
+      </ul>
+      </dd>
+
+  <dt id="cparity">/CPARITY=<value></dt>
+  <dd>Parity of serial port
+      <ul>
+        <li><span class="syntax">/CPARITY=none</span> none</li>
+        <li><span class="syntax">/CPARITY=odd</span> odd</li>
+        <li><span class="syntax">/CPARITY=even</span> even</li>
+        <li><span class="syntax">/CPARITY=mark</span> mark</li>
+        <li><span class="syntax">/CPARITY=space</span> space</li>
+      </ul>
+      </dd>
+
+  <dt id="cstopbit">/CSTOPBIT=<value></dt>
+  <dd>Stop bit of serial port
+      <ul>
+        <li><span class="syntax">/CSTOPBIT=1</span> 1bit</li>
+        <li><span class="syntax">/CSTOPBIT=1.5</span> 1.5bit</li>
+        <li><span class="syntax">/CSTOPBIT=2</span> 2bit</li>
+      </ul>
+      </dd>
+
+  <dt id="cflowctrl">/CFLOWCTRL=<value></dt>
+  <dd>Flow control of serial port
+      <ul>
+        <li><span class="syntax">/CFLOWCTRL=x</span> Xon/Xoff</li>
+        <li><span class="syntax">/CFLOWCTRL=hard</span> RTS/CTS</li>
+        <li><span class="syntax">/CFLOWCTRL=rtscts</span> RTS/CTS</li>
+        <li><span class="syntax">/CFLOWCTRL=none</span> none</li>
+        <li><span class="syntax">/CFLOWCTRL=dsrdtr</span> DSR/DTR</li>
+      </ul>
+      </dd>
+
+  <dt id="cdelayperchar">/CDELAYPERCHAR=<value></dt>
+  <dd>Transmission delay time per character of serial port(msec)
+      <ul>
+        <li><span class="syntax">/CDELAYPERCHAR=n</span> n millisecond</li>
+      </ul>
+      </dd>
+
+  <dt id="cdelayperline">/CDELAYPERLINE=<value></dt>
+  <dd>Transmission delay time per line of serial port(msec)
+      <ul>
+        <li><span class="syntax">/CDELAYPERLINE=n</span> nmillisecond</li>
+      </ul>
+      </dd>
+
 <!--
   <dt id="duplicate">/DUPLICATE</dt>
   <dd>Internal use(must not specify this option)</dd>

Modified: branches/unicode_buf/doc/en/html/menu/setup-serialport.html
===================================================================
--- branches/unicode_buf/doc/en/html/menu/setup-serialport.html	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/doc/en/html/menu/setup-serialport.html	2019-10-02 15:09:00 UTC (rev 8253)
@@ -12,7 +12,28 @@
     <h1>Serial port ([Setup] menu)</h1>
 
     <h2>"Serial port setup" dialog box</h2>
+
     <dl>
+
+      <dt id="OK">OK button</dt>
+      <dd>
+	The label of OK button is changed refering to the connection state. <br>
+	    Connect with New window   ...  Serial connection is launched with new window since TCP/IP connection is using. <br>
+	    New open ...  Serial connection starts.<br>
+	    Close and New open  ... Current COM port is closed and serial connection starts with new COM port.<br>
+	    New setting  ... The setting of current COM port is changed.<br>
+      </dd>
+
+      <dt id="Cancel">Cancel button</dt>
+      <dd>
+	Discards the setting change and close the dialog. 
+      </dd>
+
+      <dt id="Help">Help button</dt>
+      <dd>
+	Displays the help file.
+      </dd>
+
       <dt id="ComPort">Port</dt>
       <dd>
 	Serial port to be used. By default, maximum serial port number in the list is 256. It is configurable in <a href="../setup/teraterm-com.html#maxport">MaxComPort</a> setting.
@@ -43,6 +64,14 @@
       <dd>
 	Time intervals between characters (lines) being sent, in milliseconds.
       </dd>
+
+      <dt id="Information">Detail information of COM port</dt>
+      <dd>
+	The detail information of selected port is shown in the text box. <br>
+	You can select all data by using CTRL+A.
+	You can scroll horizontally by using CTRL/SHIFT + wheel. 
+      </dd>
+
     </dl>
   </body>
 </html>

Modified: branches/unicode_buf/doc/en/html/reference/develop.txt
===================================================================
--- branches/unicode_buf/doc/en/html/reference/develop.txt	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/doc/en/html/reference/develop.txt	2019-10-02 15:09:00 UTC (rev 8253)
@@ -51,7 +51,7 @@
 
 * Libraries
 - Oniguruma 6.9.3 (https://github.com/kkos/oniguruma)
-- OpenSSL 1.0.2s (http://www.openssl.org/)
+- OpenSSL 1.0.2t (http://www.openssl.org/)
 - zlib 1.2.11 (http://www.zlib.net/)
 - PuTTY 0.70 (http://www.chiark.greenend.org.uk/~sgtatham/putty/)
 - SFMT 1.5.1 (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html)

Modified: branches/unicode_buf/doc/ja/html/about/history.html
===================================================================
--- branches/unicode_buf/doc/ja/html/about/history.html	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/doc/ja/html/about/history.html	2019-10-02 15:09:00 UTC (rev 8253)
@@ -46,6 +46,13 @@
       <li><a href="../menu/setup-additional.html">Additional settings\x83_\x83C\x83A\x83\x8D\x83O</a>\x82\xCCVisual\x83^\x83u\x82ŁA\x95s\x93\xA7\x96\xBE\x93x\x82\xF0\x83X\x83\x89\x83C\x83_\x81[\x82Ŏw\x92\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
       <li>\x83\x8A\x83T\x83C\x83Y\x92\x86\x82̏c\x89\xA1\x83T\x83C\x83Y\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82̕\\x8E\xA6\x88ʒu\x82\xF0\x83\x8A\x83T\x83C\x83Y\x8C\xE3\x82̍\xC0\x95W\x82ɒǏ]\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
       <li>Eterm look-feel: <a href="../menu/setup-additional.html#MixedThemeFile">\x95ǎ\x86\x82Ɖ摜\x82\xF0\x8D\xAC\x8D\x87\x82\xB7\x82\xE9</a>\x82\xF0\x90ݒ\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81Bteraterm.ini \x82\xC9 <a href="../setup/teraterm-ini.html#BGIgnoreThemeFile">BGIgnoreThemeFile</a> \x83G\x83\x93\x83g\x83\x8A\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B\x83f\x83t\x83H\x83\x8B\x83g\x82\xCDoff\x81B</li>
+      <li>TCP/IP\x90ڑ\xB1\x92\x86\x82ɂ\xA8\x82\xA2\x82Ă\xE0<a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x8CĂяo\x82\xB9\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+      <li><a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82̃^\x83C\x83g\x83\x8B\x82\xF0\x81u\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x81v\x82\xA9\x82\xE7\x81u\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x82Ɛڑ\xB1\x81v\x82ɕύX\x82\xB5\x82\xBD\x81B</li>
+      <li><a href="../menu/setup-serialport.html#Information">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xC9COM\x83|\x81[\x83g\x82̏ڍ׏\xEE\x95\xF1\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
+      <li><a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82̃X\x83s\x81[\x83h\x90ݒ\xE8\x82Ńc\x81[\x83\x8B\x83`\x83b\x83v\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+      <li><a href="../menu/setup-serialport.html#OK">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xCCOK\x83{\x83^\x83\x93\x82̕\\x8BL\x82\xF0\x90ڑ\xB1\x8F\xF3\x91ԂŐ؂\xE8\x91ւ\xA6\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+      <li>\x8Eg\x97p\x89”\\x82\xC8COM\x83|\x81[\x83g\x82\xAA\x91\xB6\x8D݂\xB5\x82Ȃ\xA2\x8Fꍇ\x81A<a href="../menu/setup-serialport.html#OK">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xCCOK\x83{\x83^\x83\x93\x82\xF0\x89\x9F\x82\xB9\x82Ȃ\xA2\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+      <li><a href="../commandline/teraterm.html#cdatabit">/CDATABIT=</a>,  <a href="../commandline/teraterm.html#cparity">/CPARITY=</a>, <a href="../commandline/teraterm.html#cstopbit">/CSTOPBIT=</a>, <a href="../commandline/teraterm.html#cflowctrl">/CFLOWCTRL=</a>, <a href="../commandline/teraterm.html#cdelayperchar">/CDELAYPERCHAR=</a>, <a href="../commandline/teraterm.html#cdelayperline">/CDELAYPERLINE=</a> \x83R\x83}\x83\x93\x83h\x83\x89\x83C\x83\x93\x83I\x83v\x83V\x83\x87\x83\x93\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
   <li>\x83o\x83O\x8FC\x90\xB3
@@ -52,6 +59,7 @@
     <ul>
       <li>\x83\x8A\x83T\x83C\x83Y\x92\x86\x82̏c\x89\xA1\x83T\x83C\x83Y\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xAA\x81A\x83f\x83X\x83N\x83g\x83b\x83v\x82̍\xB6\x92[\x82Ə\xE3\x92[\x82ŕ\\x8E\xA6\x82\xB3\x82\xEA\x82Ȃ\xAD\x82Ȃ\xC1\x82Ă\xA2\x82\xBD\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B4.103\x82ł̃G\x83\x93\x83o\x83O\x81B</li>
       <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\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>
     </ul>
   </li>
 
@@ -3220,6 +3228,9 @@
       <li>\x83\x81\x83b\x83Z\x81[\x83W\x83{\x83b\x83N\x83X\x82̕\\x8E\xA6\x82ɓ\xAF\x88ꃁ\x83b\x83Z\x81[\x83W\x82\xAA\x95\xA1\x90\x94\x8A܂܂\xEA\x82邱\x82Ƃ\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
       <li>known_hosts\x83_\x83C\x83A\x83\x8D\x83O\x82̕\\x8E\xA6\x92\x86\x82\xC9SSH\x83T\x81[\x83o\x91\xA4\x82\xA9\x82\xE7\x83l\x83b\x83g\x83\x8F\x81[\x83N\x90ؒf\x82\xB3\x82\xEA\x82\xE9\x82ƁA\x83A\x83v\x83\x8A\x82\xAA\x83N\x83\x89\x83b\x83V\x83\x85\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>SSH1: <a href="../commandline/ttssh.html#nosecuritywarning">/nosecuritywarning</a>\x83I\x83v\x83V\x83\x87\x83\x93\x82\xAA\x8B@\x94\\x82\xB5\x82Ă\xA2\x82Ȃ\xA9\x82\xC1\x82\xBD\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>\x83\x86\x81[\x83U\x94F\x8F؃_\x83C\x83A\x83\x8D\x83O\x82ŁA\x83\x86\x81[\x83U\x96\xBC\x82\xF0\x93\xFC\x97͌\xE3\x82\xCCTAB\x83L\x81[\x82Ńp\x83X\x83t\x83\x8C\x81[\x83Y\x97\x93\x82ւ̈ړ\xAE\x82ɒx\x89\x84\x82\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x89\xFC\x91P\x82\xB5\x82\xBD\x81B</li>
+      <li>\x83\x86\x81[\x83U\x94F\x8F؃_\x83C\x83A\x83\x8D\x83O\x82ŁA\x83\x86\x81[\x83U\x96\xBC\x82\xF0\x8B󗓂ɂ\xB5\x82\xBD\x8C\xE3\x81ATAB\x83L\x81[\x82ʼnE\x91\xA4\x82̃v\x83\x8B\x83_\x83E\x83\x93\x83\x81\x83j\x83\x85\x81[\x82Ƀt\x83H\x81[\x83J\x83X\x88ړ\xAE\x82\xB5\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>
+      <li>\x83|\x81[\x83g\x93]\x91\x97\x82ŁA\x83N\x83\x89\x83C\x83A\x83\x93\x83g\x82Ƀf\x81[\x83^\x82𑗂\xE8\x8FI\x82\xED\x82\xE9\x91O\x82ɐڑ\xB1\x82\xF0\x90ؒf\x82\xB7\x82\xE9\x8Fꍇ\x82\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
 </ul>
@@ -3242,11 +3253,11 @@
     </ul>
   </li>
 
-  <!--li>\x82\xBB\x82̑\xBC
+  <li>\x82\xBB\x82̑\xBC
     <ul>
-      <li></li>
+      <li>OpenSSL 1.0.2t\x82֍\xB7\x82\xB5\x91ւ\xA6\x82\xBD\x81B</li>
     </ul>
-  </li-->
+  </li>
 </ul>
 
 <h3 id="ttssh_2.89">2019.06.15 (Ver 2.89)</h3>

Modified: branches/unicode_buf/doc/ja/html/commandline/teraterm.html
===================================================================
--- branches/unicode_buf/doc/ja/html/commandline/teraterm.html	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/doc/ja/html/commandline/teraterm.html	2019-10-02 15:09:00 UTC (rev 8253)
@@ -80,6 +80,59 @@
       \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x94ԍ\x86\x82̍ő\xE5\x92l\x82̓f\x83t\x83H\x83\x8B\x83g\x82\xC5256\x82ƂȂ\xC1\x82Ă\xA2\x82܂\xB7\x81B<a href="../setup/teraterm-com.html#maxport">MaxComPort</a>\x82ōő\xE5\x92l\x82\xF0\x95ύX\x82ł\xAB\x82܂\xB7\x81B
       </dd>
 
+  <dt id="cdatabit">/CDATABIT=<value></dt>
+  <dd>\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x82̃f\x81[\x83^\x83r\x83b\x83g
+      <ul>
+        <li><span class="syntax">/CDATABIT=7</span> 7bit</li>
+        <li><span class="syntax">/CDATABIT=8</span> 8bit</li>
+      </ul>
+      </dd>
+
+  <dt id="cparity">/CPARITY=<value></dt>
+  <dd>\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x82̃p\x83\x8A\x83e\x83B
+      <ul>
+        <li><span class="syntax">/CPARITY=none</span> none</li>
+        <li><span class="syntax">/CPARITY=odd</span> odd</li>
+        <li><span class="syntax">/CPARITY=even</span> even</li>
+        <li><span class="syntax">/CPARITY=mark</span> mark</li>
+        <li><span class="syntax">/CPARITY=space</span> space</li>
+      </ul>
+      </dd>
+
+  <dt id="cstopbit">/CSTOPBIT=<value></dt>
+  <dd>\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x82̃X\x83g\x83b\x83v\x83r\x83b\x83g
+      <ul>
+        <li><span class="syntax">/CSTOPBIT=1</span> 1bit</li>
+        <li><span class="syntax">/CSTOPBIT=1.5</span> 1.5bit</li>
+        <li><span class="syntax">/CSTOPBIT=2</span> 2bit</li>
+      </ul>
+      </dd>
+
+  <dt id="cflowctrl">/CFLOWCTRL=<value></dt>
+  <dd>\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x82̃t\x83\x8D\x81[\x90\xA7\x8C\xE4
+      <ul>
+        <li><span class="syntax">/CFLOWCTRL=x</span> Xon/Xoff</li>
+        <li><span class="syntax">/CFLOWCTRL=hard</span> RTS/CTS</li>
+        <li><span class="syntax">/CFLOWCTRL=rtscts</span> RTS/CTS</li>
+        <li><span class="syntax">/CFLOWCTRL=none</span> none</li>
+        <li><span class="syntax">/CFLOWCTRL=dsrdtr</span> DSR/DTR</li>
+      </ul>
+      </dd>
+
+  <dt id="cdelayperchar">/CDELAYPERCHAR=<value></dt>
+  <dd>\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x82̈ꕶ\x8E\x9A\x82\xA0\x82\xBD\x82\xE8\x82̑\x97\x90M\x92x\x89\x84\x8E\x9E\x8A\xD4(\x83~\x83\x8A\x95b)
+      <ul>
+        <li><span class="syntax">/CDELAYPERCHAR=n</span> n\x83~\x83\x8A\x95b</li>
+      </ul>
+      </dd>
+
+  <dt id="cdelayperline">/CDELAYPERLINE=<value></dt>
+  <dd>\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x82̈\xEA\x8Ds\x82\xA0\x82\xBD\x82\xE8\x82̑\x97\x90M\x92x\x89\x84\x8E\x9E\x8A\xD4(\x83~\x83\x8A\x95b)
+      <ul>
+        <li><span class="syntax">/CDELAYPERLINE=n</span> n\x83~\x83\x8A\x95b</li>
+      </ul>
+      </dd>
+
 <!--
   <dt id="duplicate">/DUPLICATE</dt>
   <dd>\x8Eg\x97p\x8B֎~\x81i\x83Z\x83b\x83V\x83\x87\x83\x93\x82̕\xA1\x90\xBB\x82œ\xE0\x95\x94\x82Ŏg\x82\xED\x82\xEA\x82\xE9\x81j</dd>

Modified: branches/unicode_buf/doc/ja/html/menu/setup-serialport.html
===================================================================
--- branches/unicode_buf/doc/ja/html/menu/setup-serialport.html	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/doc/ja/html/menu/setup-serialport.html	2019-10-02 15:09:00 UTC (rev 8253)
@@ -12,7 +12,27 @@
     <h1>Serial port ([Setup] \x83\x81\x83j\x83\x85\x81[)</h1>
 
     <h2>"Serial port setup" \x83_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X</h2>
+
     <dl>
+      <dt id="OK">OK button</dt>
+      <dd>
+	\x8C\xBB\x8D݂̐ڑ\xB1\x8F\xF3\x91Ԃ\xF0\x8C\xA9\x82āA\x83V\x83\x8A\x83A\x83\x8B\x90ڑ\xB1\x82̓\xAE\x8D\xEC\x82\xF0\x95\\x82\xB5\x82܂\xB7\x81B<br>
+	    \x90V\x82\xB5\x82\xA2\x83E\x83B\x83\x93\x83h\x83E\x82Őڑ\xB1   ...  TCP/IP\x90ڑ\xB1\x92\x86\x82̂\xBD\x82߁A\x90V\x82\xB5\x82\xA2\x83E\x83B\x83\x93\x83h\x83E\x82ŃV\x83\x8A\x83A\x83\x8B\x90ڑ\xB1\x82\xF0\x8Ds\x82\xA2\x82܂\xB7\x81B<br>
+	    \x90V\x8BK\x83I\x81[\x83v\x83\x93 ...  \x83V\x83\x8A\x83A\x83\x8B\x90ڑ\xB1\x82\xF0\x8Ds\x82\xA2\x82܂\xB7\x81B<br>
+	    \x83N\x83\x8D\x81[\x83Y\x81\x95\x90V\x8BK\x83I\x81[\x83v\x83\x93  ... \x8C\xBB\x8D݊J\x82\xA2\x82Ă\xA2\x82\xE9COM\x83|\x81[\x83g\x82\xF0\x95‚\xB6\x82āA\x90V\x82\xB5\x82\xA2COM\x83|\x81[\x83g\x82ŃV\x83\x8A\x83A\x83\x8B\x90ڑ\xB1\x82\xF0\x8Ds\x82\xA2\x82܂\xB7\x81B<br>
+	    \x8C\xBB\x8D݂̐ڑ\xB1\x82\xF0\x8DĐݒ\xE8  ... \x8C\xBB\x8D݊J\x82\xA2\x82Ă\xA2\x82\xE9COM\x83|\x81[\x83g\x82̐ݒ\xE8\x82\xF0\x95ύX\x82\xB5\x82܂\xB7\x81B<br>
+      </dd>
+
+      <dt id="Cancel">Cancel button</dt>
+      <dd>
+	\x90ݒ\xE8\x95ύX\x82\xF0\x83L\x83\x83\x83\x93\x83Z\x83\x8B\x82\xB5\x82āA\x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x8FI\x97\xB9\x82\xB5\x82܂\xB7\x81B
+      </dd>
+
+      <dt id="Help">Help button</dt>
+      <dd>
+	\x83w\x83\x8B\x83v\x82\xF0\x95\\x8E\xA6\x82\xB5\x82܂\xB7\x81B
+      </dd>
+
       <dt id="ComPort">Port</dt>
       <dd>
 	\x8Eg\x97p\x82\xB7\x82\xE9\x83|\x81[\x83g\x82ł\xB7\x81B\x83\x8A\x83X\x83g\x82ɕ\\x8E\xA6\x82\xB3\x82\xEA\x82\xE9\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x94ԍ\x86\x82̍ő\xE5\x92l\x82̓f\x83t\x83H\x83\x8B\x83g\x82\xC5256\x82ƂȂ\xC1\x82Ă\xA2\x82܂\xB7\x81B<a href="../setup/teraterm-com.html#maxport">MaxComPort</a>\x82ōő\xE5\x92l\x82\xF0\x95ύX\x82ł\xAB\x82܂\xB7\x81B
@@ -46,6 +66,13 @@
 	\x92P\x88ʂ̓~\x83\x8A\x95b\x82ł\xB7\x81B1\x95\xB6\x8E\x9A(\x8Ds)\x82\xB2\x82Ƃ̑҂\xBF\x8E\x9E\x8AԂ\xF0\x90ݒ\xE8\x82ł\xAB\x82܂\xB7\x81B<br>
 	Tera Term \x82\xA9\x82\xE7\x91\xE5\x97ʂ̕\xB6\x8E\x9A\x82𑗏o\x82\xB5\x82\xBD\x82Ƃ\xAB\x82Ƀ\x82\x83f\x83\x80\x82\xE2\x83z\x83X\x83g\x82\xAA\x95\xB6\x8E\x9A\x82\xF0\x8E\xE6\x82肱\x82ڂ\xB7\x8Fꍇ\x82ɂ͓K\x93\x96\x82ȑ҂\xBF\x8E\x9E\x8AԂ\xF0\x90ݒ肵\x82Ă݂Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B
       </dd>
+
+      <dt id="Information">COM\x83|\x81[\x83g\x82̏ڍ׏\xEE\x95\xF1</dt>
+      <dd>
+	\x83e\x83L\x83X\x83g\x83{\x83b\x83N\x83X\x82ł͑I\x91𒆂\xCCCOM\x83|\x81[\x83g\x82Ɋւ\xB7\x82\xE9\x8Fڍ׏\xEE\x95\xF1\x82\xF0\x95\\x8E\xA6\x82\xB5\x82܂\xB7\x81B<br>
+	CTRL+A\x82őS\x91I\x91\xF0\x82\xAA\x82ł\xAB\x82܂\xB7\x81BCTRL/SHIFT+\x83z\x83C\x81[\x83\x8B\x82ʼn\xA1\x83X\x83N\x83\x8D\x81[\x83\x8B\x82\xAA\x82ł\xAB\x82܂\xB7\x81B
+      </dd>
+
     </dl>
   </body>
 </html>

Modified: branches/unicode_buf/doc/ja/html/reference/develop.txt
===================================================================
--- branches/unicode_buf/doc/ja/html/reference/develop.txt	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/doc/ja/html/reference/develop.txt	2019-10-02 15:09:00 UTC (rev 8253)
@@ -55,7 +55,7 @@
 
 \x81\xA1 \x83\x89\x83C\x83u\x83\x89\x83\x8A
 - Oniguruma 6.9.3 (https://github.com/kkos/oniguruma)
-- OpenSSL 1.0.2s (http://www.openssl.org/)
+- OpenSSL 1.0.2t (http://www.openssl.org/)
 - zlib 1.2.11 (http://www.zlib.net/)
 - PuTTY 0.70 (http://www.chiark.greenend.org.uk/~sgtatham/putty/)
 - SFMT 1.5.1 (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index-jp.html)

Modified: branches/unicode_buf/installer/release/lang/English.lng
===================================================================
--- branches/unicode_buf/installer/release/lang/English.lng	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/installer/release/lang/English.lng	2019-10-02 15:09:00 UTC (rev 8253)
@@ -359,7 +359,7 @@
 DLG_KEYB_APPKEY=&Application Keypad
 DLG_KEYB_APPCUR=Application &Cursor
 
-DLG_SERIAL_TITLE=Tera Term: Serial port setup
+DLG_SERIAL_TITLE=Tera Term: Serial port setup and connection
 DLG_SERIAL_PORT=&Port:
 DLG_SERIAL_BAUD=Sp&eed:
 DLG_SERIAL_DATA=&Data:
@@ -369,6 +369,11 @@
 DLG_SERIAL_DELAY=Transmit delay
 DLG_SERIAL_DELAYCHAR=msec/&char
 DLG_SERIAL_DELAYLINE=msec/&line
+DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number
+DLG_SERIAL_OK_CONNECTION=Connect with &New window
+DLG_SERIAL_OK_OPEN=&New open
+DLG_SERIAL_OK_CLOSEOPEN=Close and &New open
+DLG_SERIAL_OK_RESET=&New setting
 
 DLG_TCPIP_TITLE=Tera Term: TCP/IP setup
 DLG_TCPIP_HOSTLIST=Host &list

Modified: branches/unicode_buf/installer/release/lang/French.lng
===================================================================
--- branches/unicode_buf/installer/release/lang/French.lng	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/installer/release/lang/French.lng	2019-10-02 15:09:00 UTC (rev 8253)
@@ -360,7 +360,7 @@
 DLG_KEYB_APPKEY=Codes pav\xE9 num\xE9rique
 DLG_KEYB_APPCUR=Codes Curseur pav\xE9 num\xE9rique
 
-DLG_SERIAL_TITLE=Tera Term: Config. port s\xE9rie
+DLG_SERIAL_TITLE=Tera Term: Serial port setup and connection
 DLG_SERIAL_PORT=&Port:
 DLG_SERIAL_BAUD=&Vitesse:
 DLG_SERIAL_DATA=&Donn\xE9es:
@@ -370,6 +370,11 @@
 DLG_SERIAL_DELAY=D\xE9lai de transmission
 DLG_SERIAL_DELAYCHAR=msec/&car
 DLG_SERIAL_DELAYLINE=msec/&ligne
+DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number
+DLG_SERIAL_OK_CONNECTION=Connect with &New window
+DLG_SERIAL_OK_OPEN=&New open
+DLG_SERIAL_OK_CLOSEOPEN=Close and &New open
+DLG_SERIAL_OK_RESET=&New setting
 
 DLG_TCPIP_TITLE=Tera Term: Configuration TCP/IP
 DLG_TCPIP_HOSTLIST=Liste d'h\xF4tes

Modified: branches/unicode_buf/installer/release/lang/German.lng
===================================================================
--- branches/unicode_buf/installer/release/lang/German.lng	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/installer/release/lang/German.lng	2019-10-02 15:09:00 UTC (rev 8253)
@@ -360,7 +360,7 @@
 DLG_KEYB_APPKEY=Anwendungs-Keypad
 DLG_KEYB_APPCUR=Anwendungs-Cursor
 
-DLG_SERIAL_TITLE=Seriellen Port einrichten
+DLG_SERIAL_TITLE=Tera Term: Serial port setup and connection
 DLG_SERIAL_PORT=Port:
 DLG_SERIAL_BAUD=Sp&eed:
 DLG_SERIAL_DATA=Data:
@@ -370,6 +370,11 @@
 DLG_SERIAL_DELAY=Transmit delay
 DLG_SERIAL_DELAYCHAR=msec/char
 DLG_SERIAL_DELAYLINE=msec/line
+DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number
+DLG_SERIAL_OK_CONNECTION=Connect with &New window
+DLG_SERIAL_OK_OPEN=&New open
+DLG_SERIAL_OK_CLOSEOPEN=Close and &New open
+DLG_SERIAL_OK_RESET=&New setting
 
 DLG_TCPIP_TITLE=Hostliste editieren
 DLG_TCPIP_HOSTLIST=Hostliste

Modified: branches/unicode_buf/installer/release/lang/Japanese.lng
===================================================================
--- branches/unicode_buf/installer/release/lang/Japanese.lng	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/installer/release/lang/Japanese.lng	2019-10-02 15:09:00 UTC (rev 8253)
@@ -359,7 +359,7 @@
 DLG_KEYB_APPKEY=\x83A\x83v\x83\x8A\x83P\x81[\x83V\x83\x87\x83\x93\x83L\x81[\x83p\x83b\x83h(&A)
 DLG_KEYB_APPCUR=\x83A\x83v\x83\x8A\x83P\x81[\x83V\x83\x87\x83\x93\x83J\x81[\x83\\x83\x8B(&C)
 
-DLG_SERIAL_TITLE=Tera Term: \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g \x90ݒ\xE8
+DLG_SERIAL_TITLE=Tera Term: \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g \x90ݒ\xE8\x82Ɛڑ\xB1
 DLG_SERIAL_PORT=\x83|\x81[\x83g(&P):
 DLG_SERIAL_BAUD=\x83X\x83s\x81[\x83h(&E):
 DLG_SERIAL_DATA=\x83f\x81[\x83^(&D):
@@ -369,6 +369,11 @@
 DLG_SERIAL_DELAY=\x91\x97\x90M\x92x\x89\x84
 DLG_SERIAL_DELAYCHAR=\x83~\x83\x8A\x95b/\x8E\x9A(&C)
 DLG_SERIAL_DELAYLINE=\x83~\x83\x8A\x95b/\x8Ds(&L)
+DLG_SERIAL_SPEED_TOOLTIP=\x90\x94\x92l\x82𒼐ړ\xFC\x97͂ł\xAB\x82܂\xB7
+DLG_SERIAL_OK_CONNECTION=\x90V\x82\xB5\x82\xA2\x83E\x83B\x83\x93\x83h\x83E\x82Őڑ\xB1(&N)
+DLG_SERIAL_OK_OPEN=\x90V\x8BK\x83I\x81[\x83v\x83\x93(&N)
+DLG_SERIAL_OK_CLOSEOPEN=\x83N\x83\x8D\x81[\x83Y\x81\x95\x90V\x8BK\x83I\x81[\x83v\x83\x93(&N)
+DLG_SERIAL_OK_RESET=\x8C\xBB\x8D݂̐ڑ\xB1\x82\xF0\x8DĐݒ\xE8(&N)
 
 DLG_TCPIP_TITLE=Tera Term: TCP/IP \x90ݒ\xE8
 DLG_TCPIP_HOSTLIST=\x83z\x83X\x83g\x83\x8A\x83X\x83g(&L)

Modified: branches/unicode_buf/installer/release/lang/Korean.lng
===================================================================
--- branches/unicode_buf/installer/release/lang/Korean.lng	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/installer/release/lang/Korean.lng	2019-10-02 15:09:00 UTC (rev 8253)
@@ -360,7 +360,7 @@
 DLG_KEYB_APPKEY=\xBE\xEE\xC7ø\xAE\xC4\xC9\xC0̼\xC7 Ű\xC6е\xE5(&A)
 DLG_KEYB_APPCUR=\xBE\xEE\xC7ø\xAE\xC4\xC9\xC0̼\xC7 Ŀ\xBC\xAD(&C)
 
-DLG_SERIAL_TITLE=Tera Term: \xBDø\xAE\xBE\xF3\xC6\xF7Ʈ \xBC\xB3\xC1\xA4
+DLG_SERIAL_TITLE=Tera Term: Serial port setup and connection
 DLG_SERIAL_PORT=\xC6\xF7Ʈ(&P):
 DLG_SERIAL_BAUD=\xBCӵ\xB5(&E):
 DLG_SERIAL_DATA=\xB5\xA5\xC0\xCC\xC5\xCD(&D):
@@ -370,6 +370,11 @@
 DLG_SERIAL_DELAY=\xC0\xFC\xBC\xDB\xC1\xF6\xBF\xAC
 DLG_SERIAL_DELAYCHAR=msec/&char
 DLG_SERIAL_DELAYLINE=msec/&line
+DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number
+DLG_SERIAL_OK_CONNECTION=Connect with &New window
+DLG_SERIAL_OK_OPEN=&New open
+DLG_SERIAL_OK_CLOSEOPEN=Close and &New open
+DLG_SERIAL_OK_RESET=&New setting
 
 DLG_TCPIP_TITLE=Tera Term: TCP/IP \xBC\xB3\xC1\xA4
 DLG_TCPIP_HOSTLIST=ȣ\xBD\xBAƮ \xB8\xF1\xB7\xCF(&L)

Modified: branches/unicode_buf/installer/release/lang/Russian.lng
===================================================================
--- branches/unicode_buf/installer/release/lang/Russian.lng	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/installer/release/lang/Russian.lng	2019-10-02 15:09:00 UTC (rev 8253)
@@ -360,7 +360,7 @@
 DLG_KEYB_APPKEY=&\xCF\xF0\xE8\xEC\xE5\xED\xE8\xF2\xFC Keypad
 DLG_KEYB_APPCUR=\xCF\xF0\xE8\xEC\xE5\xED\xE8\xF2\xFC &Cursor
 
-DLG_SERIAL_TITLE=Tera Term: \xCD\xE0\xF1\xF2\xF0\xEE\xE9\xEA\xE0 \xEF\xEE\xF1\xEB\xE5\xE4\xEE\xE2\xE0\xF2\xE5\xEB\xFC\xED\xEE\xE3\xEE \xEF\xEE\xF0\xF2\xE0
+DLG_SERIAL_TITLE=Tera Term: Serial port setup and connection
 DLG_SERIAL_PORT=&\xCF\xEE\xF0\xF2:
 DLG_SERIAL_BAUD=&\xD1\xEA\xEE\xF0\xEE\xF1\xF2\xFC:
 DLG_SERIAL_DATA=&\xC4\xE0\xED\xED\xFB\xE5:
@@ -370,6 +370,11 @@
 DLG_SERIAL_DELAY=\xC7\xE0\xE4\xE5\xF0\xE6\xEA\xE0 \xEF\xE5\xF0\xE5\xE4\xE0\xF7\xE8
 DLG_SERIAL_DELAYCHAR=\xEC\xF1/&\xF1\xE8\xEC\xE2\xEE\xEB
 DLG_SERIAL_DELAYLINE=\xEC\xF1/&\xF1\xF2\xF0\xEE\xEA\xE0
+DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number
+DLG_SERIAL_OK_CONNECTION=Connect with &New window
+DLG_SERIAL_OK_OPEN=&New open
+DLG_SERIAL_OK_CLOSEOPEN=Close and &New open
+DLG_SERIAL_OK_RESET=&New setting
 
 DLG_TCPIP_TITLE=Tera Term: \xCD\xE0\xF1\xF2\xF0\xEE\xE9\xEA\xE0 TCP/IP
 DLG_TCPIP_HOSTLIST=&\xCF\xE5\xF0\xE5\xF7\xE5\xED\xFC \xF5\xEE\xF1\xF2\xEE\xE2

Modified: branches/unicode_buf/installer/release/lang/Simplified Chinese.lng
===================================================================
--- branches/unicode_buf/installer/release/lang/Simplified Chinese.lng	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/installer/release/lang/Simplified Chinese.lng	2019-10-02 15:09:00 UTC (rev 8253)
@@ -360,7 +360,7 @@
 DLG_KEYB_APPKEY=Ӧ\xD3ü\xFC\xC5\xCC(&A)
 DLG_KEYB_APPCUR=Ӧ\xD3\xC3\xCA\xF3\xB1\xEA(&C)
 
-DLG_SERIAL_TITLE=Tera Term\xA3\xBA\xB4\xAE\xBF\xDA\xC9\xE8\xD6\xC3
+DLG_SERIAL_TITLE=Tera Term: Serial port setup and connection
 DLG_SERIAL_PORT=\xB6˿\xDA(&P)\xA3\xBA
 DLG_SERIAL_BAUD=\xB1\xC8\xCC\xD8\xC2\xCA(&E)\xA3\xBA
 DLG_SERIAL_DATA=\xCA\xFD\xBE\xDDλ(&D)\xA3\xBA
@@ -370,6 +370,11 @@
 DLG_SERIAL_DELAY=\xB4\xAB\xCA\xE4\xD1ӳ\xD9
 DLG_SERIAL_DELAYCHAR=\xBA\xC1\xC3\xEB/\xD7ַ\xFB
 DLG_SERIAL_DELAYLINE=\xBA\xC1\xC3\xEB/\xD0\xD0
+DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number
+DLG_SERIAL_OK_CONNECTION=Connect with &New window
+DLG_SERIAL_OK_OPEN=&New open
+DLG_SERIAL_OK_CLOSEOPEN=Close and &New open
+DLG_SERIAL_OK_RESET=&New setting
 
 DLG_TCPIP_TITLE=Tera Term\xA3\xBATCP/IP \xC9\xE8\xD6\xC3
 DLG_TCPIP_HOSTLIST=\xD6\xF7\xBB\xFA\xC1б\xED(&L)

Modified: branches/unicode_buf/installer/release/lang/Traditional Chinese.lng
===================================================================
--- branches/unicode_buf/installer/release/lang/Traditional Chinese.lng	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/installer/release/lang/Traditional Chinese.lng	2019-10-02 15:09:00 UTC (rev 8253)
@@ -360,7 +360,7 @@
 DLG_KEYB_APPKEY=\xA8ϥ\xCE\xC1\xE4\xBDL(&A)
 DLG_KEYB_APPCUR=\xA8ϥηƹ\xAB(&C)
 
-DLG_SERIAL_TITLE=Tera Term\xA1G\xB3s\xB1\xB5\xB0\xF0\xB3]\xA9w
+DLG_SERIAL_TITLE=Tera Term: Serial port setup and connection
 DLG_SERIAL_PORT=\xBAݤf(&P)\xA1G
 DLG_SERIAL_BAUD=\xA6줸\xB3t\xB2v(&E)\xA1G
 DLG_SERIAL_DATA=\xB8\xEA\xAEƦ줸(&D)\xA1G
@@ -370,6 +370,11 @@
 DLG_SERIAL_DELAY=\xB6ǿ驵\xBF\xF0
 DLG_SERIAL_DELAYCHAR=\xB2@\xAC\xED/\xA6r\xB2\xC5
 DLG_SERIAL_DELAYLINE=\xB2@\xAC\xED/\xA6\xE6
+DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number
+DLG_SERIAL_OK_CONNECTION=Connect with &New window
+DLG_SERIAL_OK_OPEN=&New open
+DLG_SERIAL_OK_CLOSEOPEN=Close and &New open
+DLG_SERIAL_OK_RESET=&New setting
 
 DLG_TCPIP_TITLE=Tera Term\xA1GTCP/IP \xB3]\xA9w
 DLG_TCPIP_HOSTLIST=\xA5D\xBE\xF7\xA6C\xAA\xED(&L)

Modified: branches/unicode_buf/teraterm/common/i18n.c
===================================================================
--- branches/unicode_buf/teraterm/common/i18n.c	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/common/i18n.c	2019-10-02 15:09:00 UTC (rev 8253)
@@ -121,21 +121,30 @@
 	return TRUE;
 }
 
-void WINAPI SetI18DlgStrs(const char *section, HWND hDlgWnd,
-				   const DlgTextInfo *infos, size_t infoCount, const char *UILanguageFile)
+/*
+ * \x8C\xBE\x8C\xEA\x83t\x83@\x83C\x83\x8B\x82\xA9\x82\xE7Dialog\x82̃R\x83\x93\x83|\x81[\x83l\x83\x93\x83g\x82̕\xB6\x8E\x9A\x97\xF1\x82\xF0\x95ϊ\xB7\x82\xB7\x82\xE9
+ *
+ * [return]
+ *    \x8C\xBE\x8C\xEA\x83t\x83@\x83C\x83\x8B\x82ŕϊ\xB7\x82ł\xAB\x82\xBD\x89\xF1\x90\x94(infoCount\x88ȉ\xBA\x82̐\x94\x82ɂȂ\xE9)
+ *
+ */
+int WINAPI SetI18DlgStrs(const char *section, HWND hDlgWnd,
+						 const DlgTextInfo *infos, size_t infoCount, const char *UILanguageFile)
 {
 	size_t i;
+	int translatedCount = 0;
+
 	assert(hDlgWnd != NULL);
 	assert(infoCount > 0);
 	for (i = 0 ; i < infoCount; i++) {
 		const char *key = infos[i].key;
+		BOOL r = FALSE;
 		if (pGetPrivateProfileStringW == NULL) {
 			// ANSI
 			char uimsg[MAX_UIMSG];
-			GetI18nStr(section, key, uimsg, sizeof(uimsg), _T(""), UILanguageFile);
+			GetI18nStr(section, key, uimsg, sizeof(uimsg), NULL, UILanguageFile);
 			if (uimsg[0] != '\0') {
 				const int nIDDlgItem = infos[i].nIDDlgItem;
-				BOOL r;
 				if (nIDDlgItem == 0) {
 					r = SetWindowTextA(hDlgWnd, uimsg);
 					assert(r != 0);
@@ -143,16 +152,14 @@
 					r = SetDlgItemTextA(hDlgWnd, nIDDlgItem, uimsg);
 					assert(r != 0);
 				}
-				(void)r;
 			}
 		}
 		else {
 			// UNICODE
 			wchar_t uimsg[MAX_UIMSG];
-			GetI18nStrW(section, key, uimsg, sizeof(uimsg), L"", UILanguageFile);
+			GetI18nStrW(section, key, uimsg, sizeof(uimsg), NULL, UILanguageFile);
 			if (uimsg[0] != L'\0') {
 				const int nIDDlgItem = infos[i].nIDDlgItem;
-				BOOL r;
 				if (nIDDlgItem == 0) {
 					r = pSetWindowTextW(hDlgWnd, uimsg);
 					assert(r != 0);
@@ -160,10 +167,13 @@
 					r = pSetDlgItemTextW(hDlgWnd, nIDDlgItem, uimsg);
 					assert(r != 0);
 				}
-				(void)r;
 			}
 		}
+		if (r)
+			translatedCount++;
 	}
+
+	return (translatedCount);
 }
 
 void WINAPI SetI18MenuStrs(const char *section, HMENU hMenu, const DlgTextInfo *infos, size_t infoCount,

Modified: branches/unicode_buf/teraterm/common/i18n.h
===================================================================
--- branches/unicode_buf/teraterm/common/i18n.h	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/common/i18n.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -49,7 +49,7 @@
 DllExport void WINAPI GetI18nStrW(const char *section, const char *key, wchar_t *buf, int buf_len, const wchar_t *def, const char *iniFile);
 DllExport void WINAPI GetI18nStr(const char *section, const char *key, PCHAR buf, int buf_len, const char *def, const char *iniFile);
 DllExport int WINAPI GetI18nLogfont(const char *section, const char *key, PLOGFONTA logfont, int ppi, const char *iniFile);
-DllExport void WINAPI SetI18DlgStrs(const char *section, HWND hDlgWnd,
+DllExport int WINAPI SetI18DlgStrs(const char *section, HWND hDlgWnd,
 							 const DlgTextInfo *infos, size_t infoCount, const char *UILanguageFile);
 DllExport void WINAPI SetI18MenuStrs(const char *section, HMENU hMenu,
 							  const DlgTextInfo *infos, size_t infoCount, const char *UILanguageFile);

Modified: branches/unicode_buf/teraterm/common/tipwin.cpp
===================================================================
--- branches/unicode_buf/teraterm/common/tipwin.cpp	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/common/tipwin.cpp	2019-10-02 15:09:00 UTC (rev 8253)
@@ -27,7 +27,7 @@
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 /*
- * Copyright (C) 2008-2018 TeraTerm Project
+ * Copyright (C) 2008-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -59,16 +59,16 @@
 #include <stdio.h>
 #include <tchar.h>
 #include <assert.h>
-#if !defined(_CRTDBG_MAP_ALLOC)
-#define _CRTDBG_MAP_ALLOC
-#endif
-#include <crtdbg.h>
 
 #include "ttlib.h"		// for GetMessageboxFont()
 
 #include "tipwin.h"
 
-static ATOM tip_class = 0;
+#ifdef _WIN64
+        typedef LONG_PTR WINDOW_LONG_PTR;
+#else
+        typedef LONG WINDOW_LONG_PTR;
+#endif
 
 typedef struct tagTipWinData {
 	HFONT tip_font;
@@ -77,8 +77,7 @@
 	HWND tip_wnd;
 	HWND hParentWnd;
 	int tip_enabled;
-	const wchar_t *strW;
-	const char *str;
+	const TCHAR *str;
 	size_t str_len;
 	RECT str_rect;
 	RECT rect;
@@ -87,33 +86,28 @@
 	BOOL auto_destroy;
 } TipWin;
 
-static void CalcStrRect(TipWin *pTipWin)
+VOID CTipWin::CalcStrRect(VOID)
 {
 	HDC hdc = CreateCompatibleDC(NULL);
-	SelectObject(hdc, pTipWin->tip_font);
-	pTipWin->str_rect.top = 0;
-	pTipWin->str_rect.left = 0;
-	if (pTipWin->strW != NULL) {
-		DrawTextW(hdc, pTipWin->strW, (int)pTipWin->str_len,
-				  &pTipWin->str_rect, DT_LEFT|DT_CALCRECT);
-	} else {
-		DrawTextA(hdc, pTipWin->str, (int)pTipWin->str_len,
-				  &pTipWin->str_rect, DT_LEFT|DT_CALCRECT);
-	}
+	SelectObject(hdc, tWin->tip_font);
+	tWin->str_rect.top = 0;
+	tWin->str_rect.left = 0;
+	DrawText(hdc, tWin->str, tWin->str_len,
+			 &tWin->str_rect, DT_LEFT|DT_CALCRECT);
 	DeleteDC(hdc);
 }
 
-static LRESULT CALLBACK SizeTipWndProc(HWND hWnd, UINT nMsg,
+LRESULT CALLBACK CTipWin::WndProc(HWND hWnd, UINT nMsg,
                                        WPARAM wParam, LPARAM lParam)
 {
-	TipWin *pTipWin = (TipWin *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
+	CTipWin* self = (CTipWin *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
 
 	switch (nMsg) {
 		case WM_CREATE: {
 			CREATESTRUCTA *create_st = (CREATESTRUCTA *)lParam;
-			pTipWin = (TipWin *)create_st->lpCreateParams;
-			SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)pTipWin);
-			pTipWin->tip_wnd = hWnd;
+			self = (CTipWin *)create_st->lpCreateParams;
+			SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)self);
+			self->tWin->tip_wnd = hWnd;
 			break;
 		}
 
@@ -130,29 +124,25 @@
 				PAINTSTRUCT ps;
 				hdc = BeginPaint(hWnd, &ps);
 
-				SelectObject(hdc, pTipWin->tip_font);
+				SelectObject(hdc, self->tWin->tip_font);
 				SelectObject(hdc, GetStockObject(BLACK_PEN));
 
-				hbr = CreateSolidBrush(pTipWin->tip_bg);
+				hbr = CreateSolidBrush(self->tWin->tip_bg);
 				holdbr = SelectObject(hdc, hbr);
 
 				GetClientRect(hWnd, &cr);
 				Rectangle(hdc, cr.left, cr.top, cr.right, cr.bottom);
 
-				SetTextColor(hdc, pTipWin->tip_text);
-				SetBkColor(hdc, pTipWin->tip_bg);
+				SetTextColor(hdc, self->tWin->tip_text);
+				SetBkColor(hdc, self->tWin->tip_bg);
 
 				{
-					RECT rect = pTipWin->str_rect;
+					RECT rect = self->tWin->str_rect;
 					rect.left = rect.left + FRAME_WIDTH;
 					rect.right = rect.right + FRAME_WIDTH;
 					rect.top = rect.top + FRAME_WIDTH;
 					rect.bottom = rect.bottom + FRAME_WIDTH;
-					if (pTipWin->strW != NULL) {
-						DrawTextW(hdc, pTipWin->strW, (int)pTipWin->str_len, &rect, DT_LEFT);
-					} else {
-						DrawText(hdc, pTipWin->str, (int)pTipWin->str_len, &rect, DT_LEFT);
-					}
+					DrawText(hdc, self->tWin->str, self->tWin->str_len, &rect, DT_LEFT);
 				}
 
 				SelectObject(hdc, holdbr);
@@ -166,20 +156,22 @@
 			return HTTRANSPARENT;
 
 		case WM_DESTROY:
-			DeleteObject(pTipWin->tip_font);
-			pTipWin->tip_font = NULL;
+			if(self->IsExists()) {
+				DeleteObject(self->tWin->tip_font);
+				self->tWin->tip_font = NULL;
+			}
 			break;
 
 		case WM_SETTEXT:
 			{
 				LPCTSTR str = (LPCTSTR) lParam;
-				const int str_width = pTipWin->str_rect.right - pTipWin->str_rect.left;
-				const int str_height = pTipWin->str_rect.bottom - pTipWin->str_rect.top;
+				const int str_width = self->tWin->str_rect.right - self->tWin->str_rect.left;
+				const int str_height = self->tWin->str_rect.bottom - self->tWin->str_rect.top;
 
-				free((void *)(pTipWin->str));
-				pTipWin->str_len = _tcslen(str);
-				pTipWin->str = _tcsdup(str);
-				CalcStrRect(pTipWin);
+				free((void *)(self->tWin->str));
+				self->tWin->str_len = _tcslen(str);
+				self->tWin->str = _tcsdup(str);
+				self->CalcStrRect();
 
 				SetWindowPos(hWnd, NULL,
 							 0, 0,
@@ -191,16 +183,25 @@
 			break;
 
 		case WM_NCDESTROY:
-			if (pTipWin->auto_destroy) {
-				if (pTipWin->str != NULL) {
-					free((void *)pTipWin->str);
-				}
-				if (pTipWin->strW != NULL) {
-					free((void *)pTipWin->strW);
-				}
-				free(pTipWin);
+			if (self->IsExists() && self->tWin->auto_destroy) {
+				free((void *)self->tWin->str);
+				free(self->tWin);
+				self->tWin = NULL;
+				delete self;
+				/*
+				 * use-after-free\x82ɂ\xE6\x82\xE8Tera Term\x82̓\xAE\x8D삪\x95s\x88\xC0\x92\xE8\x82ƂȂ\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B
+				 *
+				 * WinMain\x82\xC5 CVTWindow \x83N\x83\x89\x83X\x82̃R\x83\x93\x83X\x83g\x83\x89\x83N\x83^\x82ŁA\x83A\x83\x8D\x83P\x81[\x83g\x82\xB5\x82\xBD
+				 * TipWin\x83\x81\x83\x93\x83o\x81[\x82\xF0\x81A\x82\xB1\x82\xB1\x82̃^\x83C\x83~\x83\x93\x83O\x82ʼn\xF0\x95\xFA\x82\xB5\x82Ă\xA2\x82\xBD\x82\xBD\x82߁B
+				 * \x90\xB3\x82\xB5\x82\xAD\x82\xCD CVTWindow \x83N\x83\x89\x83X\x82̃f\x83X\x83g\x83\x89\x83N\x83^\x82ʼn\xF0\x95\xFA\x82\xB7\x82\xE9\x81B
+				 */
 			}
 			break;
+		case WM_TIMER:
+			KillTimer(hWnd, self->timerid);
+			self->timerid = NULL;
+			self->SetVisible(FALSE);
+			break;
 		default:
 			break;
 	}
@@ -208,12 +209,35 @@
 	return DefWindowProc(hWnd, nMsg, wParam, lParam);
 }
 
-static void register_class(HINSTANCE hInst)
+CTipWin::CTipWin(HWND src)
 {
+	Create(src, 0, 0, "");
+	SetVisible(FALSE);
+}
+
+CTipWin::CTipWin(HWND src, int cx, int cy, const TCHAR *str)
+{
+	Create(src, cx, cy, str);
+	SetVisible(TRUE);
+}
+
+CTipWin::~CTipWin()
+{
+	Destroy();
+}
+
+ATOM CTipWin::tip_class;
+
+VOID CTipWin::Create(HWND src, int cx, int cy, const TCHAR *str)
+{
+	const HINSTANCE hInst = (HINSTANCE)GetWindowLongPtr(src, GWLP_HINSTANCE);
+	LOGFONTA logfont;
+	const UINT uDpi = GetMonitorDpiFromWindow(src);
+
 	if (!tip_class) {
 		WNDCLASS wc;
 		wc.style = CS_HREDRAW | CS_VREDRAW;
-		wc.lpfnWndProc = SizeTipWndProc;
+		wc.lpfnWndProc = WndProc;
 		wc.cbClsExtra = 0;
 		wc.cbWndExtra = 0;
 		wc.hInstance = hInst;
@@ -221,109 +245,127 @@
 		wc.hCursor = NULL;
 		wc.hbrBackground = NULL;
 		wc.lpszMenuName = NULL;
-		wc.lpszClassName = _T("SizeTipClass");
+		wc.lpszClassName = _T("TipWinClass");
 
 		tip_class = RegisterClass(&wc);
 	}
-}
 
-/* Create the tip window */
-static void create_tipwin(TipWin *pTipWin, int cx, int cy)
-{
-	const TCHAR *str = pTipWin->str;
-	HWND hParnetWnd = pTipWin->hParentWnd;
-	const HINSTANCE hInst = (HINSTANCE)GetWindowLongPtr(hParnetWnd, GWLP_HINSTANCE);
-	register_class(hInst);
-	const int str_width = pTipWin->str_rect.right - pTipWin->str_rect.left;
-	const int str_height = pTipWin->str_rect.bottom - pTipWin->str_rect.top;
-	pTipWin->tip_wnd =
-		CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST,
-					   MAKEINTRESOURCE(tip_class),
-					   str, WS_POPUP,
-					   cx, cy,
-					   str_width + FRAME_WIDTH * 2, str_height + FRAME_WIDTH * 2,
-					   hParnetWnd, NULL, hInst, pTipWin);
-	
+	tWin = (TipWin *)malloc(sizeof(TipWin));
+	if (tWin == NULL) return;
+	tWin->str_len = _tcslen(str);
+	tWin->str = _tcsdup(str);
+	tWin->px = cx;
+	tWin->py = cy;
+	tWin->tip_bg = GetSysColor(COLOR_INFOBK);
+	tWin->tip_text = GetSysColor(COLOR_INFOTEXT);
+	GetMessageboxFont(&logfont);
+	logfont.lfWidth = MulDiv(logfont.lfWidth, uDpi, 96);
+	logfont.lfHeight = MulDiv(logfont.lfHeight, uDpi, 96);
+	tWin->tip_font = CreateFontIndirect(&logfont);
+	CalcStrRect();
+
+	const int str_width = tWin->str_rect.right - tWin->str_rect.left;
+	const int str_height = tWin->str_rect.bottom - tWin->str_rect.top;
+
 	/*
-	 * WindowsMe(9x)\x82ł́ASSH\x94F\x8F؂̃_\x83C\x83A\x83\x8D\x83O\x82̕\\x8E\xA6\x82ł\xCD NULL \x82\xAA\x95Ԃ\xC1\x82Ă\xAD\x82邽\x82߁A
-	 * \x83A\x83T\x81[\x83V\x83\x87\x83\x93\x82\xF0\x82\xB5\x82Ȃ\xA2\x82悤\x82ɂ\xB5\x82\xBD\x81BTera Term\x82̃\x8A\x83T\x83C\x83Y\x82ł\xCD NULL \x82ł͂Ȃ\xA2\x82\xAA\x81A
-	 * \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xAA\x95`\x89悳\x82\xEA\x82Ȃ\xA2\x81B
+	 * RegisterClass()\x82\xAA\x8E\xB8\x94s\x82\xB5\x82\xBD\x8Fꍇ\x82́ACreateWindowEx()\x82\xAA 87 (ERROR_INVALID_PARAMETER)\x82\xC5
+	 * \x83G\x83\x89\x81[\x82ƂȂ邽\x82߁A\x8CĂяo\x82\xB3\x82Ȃ\xA2\x82悤\x82ɂ\xB7\x82\xE9\x81B
+	 *
+	 * WindowsMe(9x)\x82ł́ASSH\x94F\x8F؃_\x83C\x83A\x83\x8D\x83O\x82̃c\x81[\x83\x8B\x83`\x83b\x83v\x95\\x8E\xA6\x82\xC5 RegisterClass() \x82\xAA
+	 * \x8E\xB8\x94s\x82\xB7\x82\xE9\x81B\x8C\xB4\x88\xF6\x95s\x96\xBE\x81B
 	 */
+	tWin->tip_wnd = NULL;
+	if (tip_class) {
+		tWin->tip_wnd =
+			CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST,
+						   MAKEINTRESOURCE(tip_class),
+						   str, WS_POPUP,
+						   cx, cy,
+						   str_width + FRAME_WIDTH * 2, str_height + FRAME_WIDTH * 2,
+						   src, NULL, hInst, this);
+	}
+
+	tWin->hParentWnd = src;
+	tWin->auto_destroy = TRUE;
+
+	pts.x = cx;
+	pts.y = cy;
+	timerid = NULL;
 }
 
-static TipWin *TipWinCreateNoStr(HWND src, int cx, int cy)
+VOID CTipWin::GetTextWidthHeight(HWND src, const TCHAR *str, int *width, int *height)
 {
-	TipWin *pTipWin;
-	LOGFONTA logfont;
-	const UINT uDpi = GetMonitorDpiFromWindow(src);
+	TipWinGetTextWidthHeight(src, str, width, height);
+}
 
-	pTipWin = (TipWin *)malloc(sizeof(TipWin));
-	if (pTipWin == NULL) return NULL;
-	pTipWin->str_len = 0;
-	pTipWin->str = NULL;
-	pTipWin->strW = NULL;
-	pTipWin->px = cx;
-	pTipWin->py = cy;
-	pTipWin->tip_bg = GetSysColor(COLOR_INFOBK);
-	pTipWin->tip_text = GetSysColor(COLOR_INFOTEXT);
-	GetMessageboxFont(&logfont);
-	logfont.lfWidth = MulDiv(logfont.lfWidth, uDpi, 96);
-	logfont.lfHeight = MulDiv(logfont.lfHeight, uDpi, 96);
-	pTipWin->tip_font = CreateFontIndirectA(&logfont);
-	pTipWin->hParentWnd = src;
-	pTipWin->auto_destroy = TRUE;
+POINT CTipWin::GetPos(void)
+{
+	return pts;
+}
 
-	create_tipwin(pTipWin, cx, cy);
+VOID CTipWin::SetPos(int x, int y)
+{
+	if(IsExists()) {
+		pts.x = x;
+		pts.y = y;
+		SetWindowPos(tWin->tip_wnd, 0, x, y, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
 
-	return pTipWin;
+	}
 }
 
-TipWin *TipWinCreateW(HWND src, int cx, int cy, const wchar_t *str)
+VOID CTipWin::SetText(const char *str)
 {
-	TipWin *pTipWin = TipWinCreateNoStr(src, cx, cy);
-	TipWinSetTextW(pTipWin, str);
-	ShowWindow(pTipWin->tip_wnd, SW_SHOWNOACTIVATE);
-	return pTipWin;
+	if(IsExists()) {
+		SetWindowText(tWin->tip_wnd, str);
+		// \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82̃e\x83L\x83X\x83g\x82ƃE\x83B\x83\x93\x83h\x83E\x82̕`\x89揇\x82̊֌W\x82Ńe\x83L\x83X\x83g\x82\xF02\x93x\x95`\x89悵\x82ăc\x81[\x83\x8B\x83`\x83b\x83v\x83E\x83B\x83\x93\x83h\x83E\x82\xF0\x83\x8A\x83T\x83C\x83Y\x82\xB7\x82\xE9
+		SetWindowText(tWin->tip_wnd, str);
+	}
 }
 
-TipWin *TipWinCreateA(HWND src, int cx, int cy, const char *str)
+VOID CTipWin::Destroy(void)
 {
-	TipWin *pTipWin = TipWinCreateNoStr(src, cx, cy);
-	TipWinSetTextA(pTipWin, str);
-	ShowWindow(pTipWin->tip_wnd, SW_SHOWNOACTIVATE);
-	return pTipWin;
+	if(IsExists()) {
+		DestroyWindow(tWin->tip_wnd);
+	}
 }
 
-static void SetText(TipWin *pTipWin, const wchar_t *textW, const char *text)
+VOID CTipWin::SetHideTimer(int ms)
 {
-	HWND hWnd = pTipWin->tip_wnd;
+	if(IsExists()) {
+		HWND hWnd = tWin->tip_wnd;
+		timerid = SetTimer(hWnd, NULL, ms, NULL);
+	}
+}
 
-	if (pTipWin->str != NULL) {
-		free((void *)(pTipWin->str));
-		pTipWin->str = NULL;
+BOOL CTipWin::IsExists(void)
+{
+	return (tWin != NULL);
+}
+
+VOID CTipWin::SetVisible(BOOL bVisible)
+{
+	int visible = (bVisible) ? SW_SHOWNOACTIVATE : SW_HIDE;
+	if(IsExists()) {
+		HWND hWnd = tWin->tip_wnd;
+		if(IsWindowVisible(hWnd) != bVisible) {
+			ShowWindow(hWnd, visible);
+		}
 	}
-	if (pTipWin->strW != NULL) {
-		free((void *)(pTipWin->strW));
-		pTipWin->strW = NULL;
+}
+
+BOOL CTipWin::IsVisible(void)
+{
+	if(IsExists()) {
+		HWND hWnd = tWin->tip_wnd;
+		return (BOOL)IsWindowVisible(hWnd);
 	}
-	if (textW != NULL) {
-		pTipWin->str_len = wcslen(textW);
-		pTipWin->strW = _wcsdup(textW);
-		SetWindowTextW(hWnd, textW);
-	} else {
-		pTipWin->str_len = _tcslen(text);
-		pTipWin->str = _tcsdup(text);
-		SetWindowTextA(hWnd, text);
-	}
-	CalcStrRect(pTipWin);
+	return FALSE;
+}
 
-	const int str_width = pTipWin->str_rect.right - pTipWin->str_rect.left;
-	const int str_height = pTipWin->str_rect.bottom - pTipWin->str_rect.top;
-	SetWindowPos(hWnd, NULL,
-				 0, 0,
-				 str_width + FRAME_WIDTH * 2, str_height + FRAME_WIDTH * 2,
-				 SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
-	InvalidateRect(hWnd, NULL, FALSE);
+TipWin* TipWinCreate(HWND src)
+{
+	CTipWin* tipwin = new CTipWin(src, 0, 0, "");
+	return (TipWin*)tipwin;
 }
 
 /*
@@ -362,7 +404,7 @@
 	SelectObject(hdc, tip_font);
 	str_rect.top = 0;
 	str_rect.left = 0;
-	DrawText(hdc, str, (int)str_len, &str_rect, DT_LEFT|DT_CALCRECT);
+	DrawText(hdc, str, str_len, &str_rect, DT_LEFT|DT_CALCRECT);
 	*width = str_rect.right - str_rect.left;
 	*height = str_rect.bottom - str_rect.top;
 	DeleteDC(hdc);
@@ -371,33 +413,58 @@
 	DeleteObject(tip_font);
 }
 
-void TipWinSetTextW(TipWin *tWin, const wchar_t *text)
+void TipWinGetPos(TipWin *tWin, int *x, int *y)
 {
-	if (tWin != NULL) {
-		SetText(tWin, text, NULL);
-	}
+	CTipWin* tipwin = (CTipWin*) tWin;
+	POINT pt = tipwin->GetPos();
+	*x = (int)pt.x;
+	*y = (int)pt.y;
 }
 
-void TipWinSetTextA(TipWin *tWin, const char *text)
+void TipWinSetPos(TipWin *tWin, int x, int y)
 {
-	if (tWin != NULL) {
-		SetText(tWin, NULL, text);
-	}
+	CTipWin* tipwin = (CTipWin*) tWin;
+	tipwin->SetPos(x, y);
 }
 
-void TipWinSetPos(TipWin *tWin, int x, int y)
+void TipWinSetText(TipWin* tWin, const char *str)
 {
-	if (tWin != NULL) {
-		HWND tip_wnd = tWin->tip_wnd;
-		SetWindowPos(tip_wnd, 0, x, y, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
-	}
+	CTipWin* tipwin = (CTipWin*) tWin;
+	tipwin->SetText(str);
 }
 
-void TipWinDestroy(TipWin *tWin)
+VOID TipWinSetTextW(TipWin* tWin, const wchar_t *str)
 {
-	if (tWin != NULL) {
-		HWND tip_wnd = tWin->tip_wnd;
-		DestroyWindow(tip_wnd);
-	}
+	CTipWin* tipwin = (CTipWin*) tWin;
+	tipwin->SetText("not implimented");
 }
 
+void TipWinSetHideTimer(TipWin *tWin, int ms)
+{
+	CTipWin* tipwin = (CTipWin*) tWin;
+	tipwin->SetHideTimer(ms);
+}
+
+void TipWinDestroy(TipWin* tWin)
+{
+	CTipWin* tipwin = (CTipWin*) tWin;
+	tipwin->Destroy();
+}
+
+int TipWinIsExists(TipWin *tWin)
+{
+	CTipWin* tipwin = (CTipWin*) tWin;
+	return (int)tipwin->IsExists();
+}
+
+void TipWinSetVisible(TipWin* tWin, int bVisible)
+{
+	CTipWin* tipwin = (CTipWin*) tWin;
+	tipwin->SetVisible(bVisible);
+}
+
+int TipWinIsVisible(TipWin* tWin)
+{
+	CTipWin* tipwin = (CTipWin*) tWin;
+	return (int)tipwin->IsVisible();
+}

Modified: branches/unicode_buf/teraterm/common/tipwin.h
===================================================================
--- branches/unicode_buf/teraterm/common/tipwin.h	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/common/tipwin.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -26,6 +26,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _H_TIPWIN
+#define _H_TIPWIN
 #include <windows.h>
 #include <tchar.h>
 
@@ -37,24 +39,46 @@
 
 typedef struct tagTipWinData TipWin;
 
-TipWin *TipWinCreateW(HWND src, int cx, int cy, const wchar_t *str);
-TipWin *TipWinCreateA(HWND src, int cx, int cy, const char *str);
+TipWin *TipWinCreate(HWND src);
+void TipWinSetText(TipWin *tWin, const char *text);
 void TipWinSetTextW(TipWin *tWin, const wchar_t *text);
-void TipWinSetTextA(TipWin *tWin, const char *text);
-void TipWinSetPos(TipWin *tWin, int x, int y);
 void TipWinDestroy(TipWin *tWin);
 void TipWinGetTextWidthHeight(HWND src, const TCHAR *str, int *width, int *height);
+void TipWinGetPos(TipWin *tWin, int *x, int *y);
 void TipWinSetPos(TipWin *tWin, int x, int y);
+void TipWinSetHideTimer(TipWin *tWin, int ms);
+void TipWinSetVisible(TipWin *tWin, int visible);
+int TipWinIsExists(TipWin *tWin);
+int TipWinIsVisible(TipWin *tWin);
 
-#if defined(UNICODE)
-#define	TipWinCreate(p1, p2, p3, p4)	TipWinCreateW(p1, p2, p3, p4)
-#define TipWinSetText(p1, p2)			TipWinSetTextW(p1, p2)
-#else
-#define	TipWinCreate(p1, p2, p3, p4)	TipWinCreateA(p1, p2, p3, p4)
-#define TipWinSetText(p1, p2)			TipWinSetTextA(p1, p2)
+#ifdef __cplusplus
+}
 #endif
 
-
 #ifdef __cplusplus
-}
+class CTipWin
+{
+public:
+	CTipWin(HWND hWnd, int x, int y, const TCHAR *str);
+	CTipWin(HWND hWnd);
+	~CTipWin(VOID);
+	VOID SetText(const char *str);
+	VOID Destroy(VOID);
+	VOID GetTextWidthHeight(HWND src, const TCHAR *str, int *width, int *height);
+	POINT GetPos(VOID);
+	VOID SetPos(int x, int y);
+	VOID SetHideTimer(int ms);
+	VOID Create(HWND src, int x, int y, const TCHAR *str);
+	BOOL IsExists(VOID);
+	VOID SetVisible(BOOL bVisible);
+	BOOL IsVisible();
+private:
+	POINT pts;
+	UINT timerid;
+	TipWin* tWin;
+	static ATOM tip_class;
+	static LRESULT CALLBACK WndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam);
+	VOID CalcStrRect(VOID);
+};
 #endif
+#endif

Modified: branches/unicode_buf/teraterm/common/tmfc.cpp
===================================================================
--- branches/unicode_buf/teraterm/common/tmfc.cpp	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/common/tmfc.cpp	2019-10-02 15:09:00 UTC (rev 8253)
@@ -672,10 +672,6 @@
 {
 }
 
-void TTCPropertyPage::OnTimer(UINT_PTR nIDEvent)
-{
-}
-
 HBRUSH TTCPropertyPage::OnCtlColor(HDC hDC, HWND hWnd)
 {
 	return (HBRUSH)::DefWindowProc(m_hWnd, WM_CTLCOLORSTATIC, (WPARAM)hDC, (LPARAM)hWnd);
@@ -725,9 +721,6 @@
 	case WM_HSCROLL:
 		self->OnHScroll(LOWORD(wp), HIWORD(wp), (HWND)lp);
 		break;
-	case WM_TIMER:
-		self->OnTimer(LOWORD(wp));
-		break;
 	}
 	return FALSE;
 }

Modified: branches/unicode_buf/teraterm/common/tmfc.h
===================================================================
--- branches/unicode_buf/teraterm/common/tmfc.h	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/common/tmfc.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -171,7 +171,6 @@
 	virtual void OnInitDialog();
 	virtual void OnOK();
 	virtual void OnHScroll(UINT nSBCode, UINT nPos, HWND pScrollBar);
-	virtual void OnTimer(UINT_PTR nIDEvent);
 	virtual BOOL OnCommand(WPARAM wp, LPARAM lp);
 	virtual HBRUSH OnCtlColor(HDC hDC, HWND hWnd);
 	virtual void OnHelp();

Modified: branches/unicode_buf/teraterm/common/ttlib.c
===================================================================
--- branches/unicode_buf/teraterm/common/ttlib.c	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/common/ttlib.c	2019-10-02 15:09:00 UTC (rev 8253)
@@ -1868,9 +1868,9 @@
 	return TRUE;
 }
 
-void SetDlgTexts(HWND hDlgWnd, const DlgTextInfo *infos, int infoCount, const char *UILanguageFile)
+int SetDlgTexts(HWND hDlgWnd, const DlgTextInfo *infos, int infoCount, const char *UILanguageFile)
 {
-	SetI18DlgStrs("Tera Term", hDlgWnd, infos, infoCount, UILanguageFile);
+	return SetI18DlgStrs("Tera Term", hDlgWnd, infos, infoCount, UILanguageFile);
 }
 
 void SetDlgMenuTexts(HMENU hMenu, const DlgTextInfo *infos, int infoCount, const char *UILanguageFile)

Modified: branches/unicode_buf/teraterm/common/ttlib.h
===================================================================
--- branches/unicode_buf/teraterm/common/ttlib.h	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/common/ttlib.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -122,7 +122,7 @@
 
 #define CheckFlag(var, flag)	(((var) & (flag)) != 0)
 
-void SetDlgTexts(HWND hDlgWnd, const DlgTextInfo *infos, int infoCount, const char *UILanguageFile);
+int SetDlgTexts(HWND hDlgWnd, const DlgTextInfo *infos, int infoCount, const char *UILanguageFile);
 void SetDlgMenuTexts(HMENU hMenu, const DlgTextInfo *infos, int infoCount, const char *UILanguageFile);
 int GetMonitorDpiFromWindow(HWND hWnd);
 
@@ -136,6 +136,16 @@
 #define	get_OPENFILENAME_SIZE() get_OPENFILENAME_SIZEA()
 #endif
 
+/*
+ * \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x8A֘A\x82̐ݒ\xE8\x92\xE8\x8B`
+ */
+enum serial_port_conf {
+	COM_DATABIT, 
+	COM_PARITY,
+	COM_STOPBIT,
+	COM_FLOWCTRL,
+};
+
 #ifdef __cplusplus
 }
 #endif

Modified: branches/unicode_buf/teraterm/common/tttypes.h
===================================================================
--- branches/unicode_buf/teraterm/common/tttypes.h	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/common/tttypes.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -46,7 +46,6 @@
 #define IdPrnProcTimer       9
 #define IdCancelConnectTimer 10  // add (2007.1.10 yutaka)
 #define IdPasteDelayTimer    11
-#define IdOpacityTipTimer	12	// add (2019.9.7 yasuhide)
 
   /* Window Id */
 #define IdVT  1

Modified: branches/unicode_buf/teraterm/teraterm/CMakeLists.txt
===================================================================
--- branches/unicode_buf/teraterm/teraterm/CMakeLists.txt	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/CMakeLists.txt	2019-10-02 15:09:00 UTC (rev 8253)
@@ -6,9 +6,6 @@
 if(USE_UNICODE_API)
   add_definitions(-DUNICODE -D_UNICODE)
 endif()
-if(ENABLE_DPIAWARENESS)
-  add_definitions(-DDPIAWARENESS)
-endif()
 
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/")
 
@@ -154,7 +151,6 @@
   ../ttpmacro/fileread.cpp
   )
 
-
 link_directories(
   ${ONIGURUMA_LIBRARY_DIRS}
   ${SFMT_LIBRARY_DIRS}
@@ -187,6 +183,7 @@
   ../common
   ../ttpfile
   ../ttpdlg
+  ../ttpcmn
   ${ONIGURUMA_INCLUDE_DIRS}
   ${CMAKE_CURRENT_BINARY_DIR}/../ttpdlg     # for svnversion.h
   ${SFMT_INCLUDE_DIRS}

Modified: branches/unicode_buf/teraterm/teraterm/addsetting.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/addsetting.cpp	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/addsetting.cpp	2019-10-02 15:09:00 UTC (rev 8253)
@@ -38,7 +38,6 @@
 #include <time.h>
 #include <tchar.h>
 #include <crtdbg.h>
-#include <math.h>
 
 #include "teraterm.h"
 #include "tttypes.h"
@@ -73,20 +72,18 @@
 };
 #define MOUSE_CURSOR_MAX (sizeof(MouseCursor)/sizeof(MouseCursor[0]) - 1)
 
-static TipWin *ActiveOpacityTip;
-static TipWin *InactiveOpacityTip;
-
 void CVisualPropPageDlg::SetupRGBbox(int index)
 {
+	COLORREF Color = ts.ANSIColor[index];
 	BYTE c;
 
-	c = GetRValue(ts.ANSIColor[index]);
+	c = GetRValue(Color);
 	SetDlgItemNum(IDC_COLOR_RED, c);
 
-	c = GetGValue(ts.ANSIColor[index]);
+	c = GetGValue(Color);
 	SetDlgItemNum(IDC_COLOR_GREEN, c);
 
-	c = GetBValue(ts.ANSIColor[index]);
+	c = GetBValue(Color);
 	SetDlgItemNum(IDC_COLOR_BLUE, c);
 }
 
@@ -638,22 +635,17 @@
 				  L"Visual", ts.UILanguageFile);
 	m_psp.pszTitle = _wcsdup(UIMsg);
 	m_psp.dwFlags |= (PSP_USETITLE | PSP_HASHELP);
+	TipWin = new CTipWin(m_hWnd);
 }
 
 CVisualPropPageDlg::~CVisualPropPageDlg()
 {
 	free((void *)m_psp.pszTitle);
+	TipWin->Destroy();
 }
 
 // CVisualPropPageDlg \x83\x81\x83b\x83Z\x81[\x83W \x83n\x83\x93\x83h\x83\x89
 
-static void DestroyOpacityTip(TipWin** OpacityTip) {
-	if (*OpacityTip) {
-		TipWinDestroy(*OpacityTip);
-		(*OpacityTip) = NULL;
-	}
-}
-
 void CVisualPropPageDlg::OnInitDialog()
 {
 	char buf[MAXPATHLEN];
@@ -701,15 +693,15 @@
 	// (1)AlphaBlend
 
 	SetDlgItemNum(IDC_ALPHA_BLEND_ACTIVE, ts.AlphaBlendActive);
-	DestroyOpacityTip(&ActiveOpacityTip);
 	SendDlgItemMessage(IDC_ALPHA_BLEND_ACTIVE_TRACKBAR, TBM_SETRANGE, TRUE, MAKELPARAM(0, 255));
 	SendDlgItemMessage(IDC_ALPHA_BLEND_ACTIVE_TRACKBAR, TBM_SETPOS, TRUE, ts.AlphaBlendActive);
 
 	SetDlgItemNum(IDC_ALPHA_BLEND_INACTIVE, ts.AlphaBlendInactive);
-	DestroyOpacityTip(&InactiveOpacityTip);
 	SendDlgItemMessage(IDC_ALPHA_BLEND_INACTIVE_TRACKBAR, TBM_SETRANGE, TRUE, MAKELPARAM(0, 255));
 	SendDlgItemMessage(IDC_ALPHA_BLEND_INACTIVE_TRACKBAR, TBM_SETPOS, TRUE, ts.AlphaBlendInactive);
 
+	TipWin->SetVisible(FALSE);
+
 	// (2)[BG] BGEnable
 	SetCheck(IDC_ETERM_LOOKFEEL, ts.EtermLookfeel.BGEnable);
 
@@ -955,6 +947,22 @@
 			}
 			return TRUE;
 
+		case IDC_EDIT_BGIMG_BRIGHTNESS | (EN_CHANGE << 16) :
+			{
+				int b;
+
+				b = GetDlgItemInt(IDC_EDIT_BGIMG_BRIGHTNESS);
+				if (b < 0) {
+					b = 0;
+					SetDlgItemNum(IDC_EDIT_BGIMG_BRIGHTNESS, b);
+				}
+				else if (b > 255) {
+					b = 255;
+					SetDlgItemNum(IDC_EDIT_BGIMG_BRIGHTNESS, b);
+				}
+			}
+			return TRUE;
+
 		case IDC_ANSI_COLOR | (LBN_SELCHANGE << 16):
 			sel = SendDlgItemMessage(IDC_ANSI_COLOR, LB_GETCURSEL, 0, 0);
 			if (sel != -1) {
@@ -963,12 +971,11 @@
 			}
 			return TRUE;
 
-		case IDC_COLOR_RED | (EN_KILLFOCUS << 16):
-		case IDC_COLOR_GREEN | (EN_KILLFOCUS << 16):
-		case IDC_COLOR_BLUE | (EN_KILLFOCUS << 16):
+		case IDC_COLOR_RED | (EN_CHANGE << 16) :
+		case IDC_COLOR_GREEN | (EN_CHANGE << 16) :
+		case IDC_COLOR_BLUE | (EN_CHANGE << 16) :
 			{
-				BYTE r, g, b;
-				char buf[8];
+				int r, g, b;
 
 				sel = GetCurSel(IDC_ANSI_COLOR);
 				if (sel < 0 && sel > sizeof(ts.ANSIColor)-1) {
@@ -975,20 +982,39 @@
 					return TRUE;
 				}
 
-				GetDlgItemTextA(IDC_COLOR_RED, buf, sizeof(buf));
-				r = atoi(buf);
+				r = GetDlgItemInt(IDC_COLOR_RED);
+				if (r < 0) {
+					r = 0;
+					SetDlgItemNum(IDC_COLOR_RED, r);
+				}
+				else if (r > 255) {
+					r = 255;
+					SetDlgItemNum(IDC_COLOR_RED, r);
+				}
 
-				GetDlgItemTextA(IDC_COLOR_GREEN, buf, sizeof(buf));
-				g = atoi(buf);
+				g = GetDlgItemInt(IDC_COLOR_GREEN);
+				if (g < 0) {
+					g = 0;
+					SetDlgItemNum(IDC_COLOR_GREEN, g);
+				}
+				else if (g > 255) {
+					g = 255;
+					SetDlgItemNum(IDC_COLOR_GREEN, g);
+				}
 
-				GetDlgItemTextA(IDC_COLOR_BLUE, buf, sizeof(buf));
-				b = atoi(buf);
+				b = GetDlgItemInt(IDC_COLOR_BLUE);
+				if (b < 0) {
+					b = 0;
+					SetDlgItemNum(IDC_COLOR_BLUE, b);
+				}
+				else if (b > 255) {
+					b = 255;
+					SetDlgItemNum(IDC_COLOR_BLUE, b);
+				}
 
+				// OK \x82\xF0\x89\x9F\x82\xB3\x82Ȃ\xAD\x82Ă\xE0\x90ݒ肪\x95ۑ\xB6\x82\xB3\x82\xEA\x82Ă\xA2\x82\xE9
 				ts.ANSIColor[sel] = RGB(r, g, b);
 
-				// 255\x82𒴂\xA6\x82\xBDRGB\x92l\x82͕␳\x82\xB3\x82\xEA\x82\xE9\x82̂ŁA\x82\xBB\x82\xEA\x82\xF0Edit\x82ɕ\\x8E\xA6\x82\xB7\x82\xE9 (2007.2.18 maya)
-				SetupRGBbox(sel);
-
 				::InvalidateRect(GetDlgItem(IDC_SAMPLE_COLOR), NULL, TRUE);
 			}
 			return TRUE;
@@ -996,6 +1022,14 @@
 			{
 				int pos;
 				pos = GetDlgItemInt(IDC_ALPHA_BLEND_ACTIVE);
+				if(pos < 0) {
+					pos = 0;
+					SetDlgItemNum(IDC_ALPHA_BLEND_ACTIVE, pos);
+				}
+				else if(pos > 255) {
+					pos = 255;
+					SetDlgItemNum(IDC_ALPHA_BLEND_ACTIVE, pos);
+				}
 				SendDlgItemMessage(IDC_ALPHA_BLEND_ACTIVE_TRACKBAR, TBM_SETPOS, TRUE, pos);
 
 				TCHAR tipbuf[32];
@@ -1004,17 +1038,13 @@
 				get_lang_msg("TOOLTIP_TITLEBAR_OPACITY", uimsg, sizeof(uimsg), "Opacity %.1f %%", ts.UILanguageFile);
 				_stprintf_s(tipbuf, _countof(tipbuf), _T(uimsg), (pos / 255.0) * 100);
 
-				DestroyOpacityTip(&InactiveOpacityTip);
-				SetTimer(GetSafeHwnd(), IdOpacityTipTimer, 1000, NULL);
 				::GetWindowRect(GetDlgItem(IDC_ALPHA_BLEND_ACTIVE), &rc);
-				if (ActiveOpacityTip == NULL) {
-					ActiveOpacityTip = TipWinCreate(GetDlgItem(IDC_ALPHA_BLEND_ACTIVE), rc.right, rc.bottom, tipbuf);
+				TipWin->SetText(tipbuf);
+				TipWin->SetPos(rc.right, rc.bottom);
+				TipWin->SetHideTimer(1000);
+				if (! TipWin->IsVisible()) {
+					TipWin->SetVisible(TRUE);
 				}
-				else {
-					TipWinSetText(ActiveOpacityTip, tipbuf);
-					// \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82̃\x8A\x83T\x83C\x83Y\x82\xAA\x8E\xB8\x94s\x82\xB5\x82\xBD\x82悤\x82Ɍ\xA9\x82\xA6\x82\xE9\x96\xE2\x91\xE8\x82̎b\x92\xE8\x91΍\xF4
-					TipWinSetText(ActiveOpacityTip, tipbuf);
-				}
 				return TRUE;
 			}
 		case IDC_ALPHA_BLEND_INACTIVE | (EN_CHANGE << 16):
@@ -1021,6 +1051,14 @@
 			{
 				int pos;
 				pos = GetDlgItemInt(IDC_ALPHA_BLEND_INACTIVE);
+				if(pos < 0) {
+					pos = 0;
+					SetDlgItemNum(IDC_ALPHA_BLEND_INACTIVE, pos);
+				}
+				else if(pos > 255) {
+					pos = 255;
+					SetDlgItemNum(IDC_ALPHA_BLEND_INACTIVE, pos);
+				}
 				SendDlgItemMessage(IDC_ALPHA_BLEND_INACTIVE_TRACKBAR, TBM_SETPOS, TRUE, pos);
 
 				TCHAR tipbuf[32], uimsg[MAX_UIMSG];
@@ -1028,17 +1066,13 @@
 				get_lang_msg("TOOLTIP_TITLEBAR_OPACITY", uimsg, sizeof(uimsg), "Opacity %.1f %%", ts.UILanguageFile);
 				_stprintf_s(tipbuf, _countof(tipbuf), _T(uimsg), (pos / 255.0) * 100);
 
-				DestroyOpacityTip(&ActiveOpacityTip);
-				SetTimer(GetSafeHwnd(), IdOpacityTipTimer, 1000, NULL);
 				::GetWindowRect(GetDlgItem(IDC_ALPHA_BLEND_INACTIVE), &rc);
-				if (InactiveOpacityTip == NULL) {
-					InactiveOpacityTip = TipWinCreate(GetDlgItem(IDC_ALPHA_BLEND_INACTIVE), rc.right, rc.bottom, tipbuf);
+				TipWin->SetText(tipbuf);
+				TipWin->SetPos(rc.right, rc.bottom);
+				TipWin->SetHideTimer(1000);
+				if (! TipWin->IsVisible()) {
+					TipWin->SetVisible(TRUE);
 				}
-				else {
-					TipWinSetText(InactiveOpacityTip, tipbuf);
-					// \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82̃\x8A\x83T\x83C\x83Y\x82\xAA\x8E\xB8\x94s\x82\xB5\x82\xBD\x82悤\x82Ɍ\xA9\x82\xA6\x82\xE9\x96\xE2\x91\xE8\x82̎b\x92\xE8\x91΍\xF4
-					TipWinSetText(InactiveOpacityTip, tipbuf);
-				}
 				return TRUE;
 			}
 	}
@@ -1046,18 +1080,6 @@
 	return TTCPropertyPage::OnCommand(wParam, lParam);
 }
 
-
-void CVisualPropPageDlg::OnTimer(UINT_PTR nIDEvent)
-{
-	KillTimer(GetSafeHwnd(), nIDEvent);
-	switch (nIDEvent) {
-		case IdOpacityTipTimer:
-			DestroyOpacityTip(&ActiveOpacityTip);
-			DestroyOpacityTip(&InactiveOpacityTip);
-			break;
-	}
-}
-
 HBRUSH CVisualPropPageDlg::OnCtlColor(HDC hDC, HWND hWnd)
 {
 	if ( hWnd == GetDlgItem(IDC_SAMPLE_COLOR) ) {

Modified: branches/unicode_buf/teraterm/teraterm/addsetting.h
===================================================================
--- branches/unicode_buf/teraterm/teraterm/addsetting.h	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/addsetting.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -31,6 +31,7 @@
 #include "tmfc.h"
 #include "tt_res.h"
 #include "teraterm.h"
+#include "tipwin.h"
 
 typedef struct {
 	const char *name;
@@ -93,9 +94,9 @@
 	enum { IDD = IDD_TABSHEET_VISUAL };
 	BOOL OnCommand(WPARAM wParam, LPARAM lParam);
 	void OnHScroll(UINT nSBCode, UINT nPos, HWND pScrollBar);
-	void OnTimer(UINT_PTR nIDEvent);
 	void SetupRGBbox(int index);
 	void OnHelp();
+	CTipWin* TipWin;
 };
 
 // Log Page

Modified: branches/unicode_buf/teraterm/teraterm/filesys.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/filesys.cpp	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/filesys.cpp	2019-10-02 15:09:00 UTC (rev 8253)
@@ -43,7 +43,6 @@
 #include "ttcommon.h"
 #include "ttdde.h"
 #include "ttlib.h"
-#include "helpid.h"
 #include "dlglib.h"
 #include "vtterm.h"
 #include "win16api.h"
@@ -639,7 +638,6 @@
 	if (ts.LogHideDialog)
 		LogVar->HideDialog = 1;
 
-	HelpId = HlpFileLog;
 	/* 2007.05.24 Gentaro */
 	eLineEnd = Line_LineHead;
 

Modified: branches/unicode_buf/teraterm/teraterm/ftdlg.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ftdlg.cpp	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ftdlg.cpp	2019-10-02 15:09:00 UTC (rev 8253)
@@ -43,6 +43,7 @@
 #include "tt_res.h"
 #include "ftdlg.h"
 #include "teraterml.h"
+#include "helpid.h"
 
 /////////////////////////////////////////////////////////////////////////////
 // CFileTransDlg dialog
@@ -216,7 +217,7 @@
 			ChangeButton(! Pause);
 			return TRUE;
 		case IDC_TRANSHELP:
-			::PostMessage(fv->HMainWin,WM_USER_DLGHELP2,0,0);
+			::PostMessage(fv->HMainWin,WM_USER_DLGHELP2,HlpFileSend,0);
 			return TRUE;
 		default:
 			return (TTCDialog::OnCommand(wParam,lParam));

Modified: branches/unicode_buf/teraterm/teraterm/sizetip.c
===================================================================
--- branches/unicode_buf/teraterm/teraterm/sizetip.c	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/sizetip.c	2019-10-02 15:09:00 UTC (rev 8253)
@@ -41,22 +41,22 @@
 static TipWin *SizeTip;
 static int tip_enabled = 0;
 
-/**
- *	point を
- *	スクリーンからはみ出している場合、入るように補正する
- *	NearestMonitor が TRUE のとき、最も近いモニタ
- *	FALSEのとき、マウスのあるモニタに移動させる
- *	ディスプレイの端から FrameWidth(pixel) より離れるようにする
+/*
+ *	point \x82\xF0
+ *	\x83X\x83N\x83\x8A\x81[\x83\x93\x82\xA9\x82\xE7\x82͂ݏo\x82\xB5\x82Ă\xA2\x82\xE9\x8Fꍇ\x81A\x93\xFC\x82\xE9\x82悤\x82ɕ␳\x82\xB7\x82\xE9
+ *	NearestMonitor \x82\xAA TRUE \x82̂Ƃ\xAB\x81A\x8Dł\xE0\x8B߂\xA2\x83\x82\x83j\x83^
+ *	FALSE\x82̂Ƃ\xAB\x81A\x83}\x83E\x83X\x82̂\xA0\x82郂\x83j\x83^\x82Ɉړ\xAE\x82\xB3\x82\xB9\x82\xE9
+ *	\x83f\x83B\x83X\x83v\x83\x8C\x83C\x82̒[\x82\xA9\x82\xE7 FrameWidth(pixel) \x82\xE6\x82藣\x82\xEA\x82\xE9\x82悤\x82ɂ\xB7\x82\xE9
  */
 static void FixPosFromFrame(POINT *point, int FrameWidth, BOOL NearestMonitor)
 {
 	if (HasMultiMonitorSupport()) {
-		// マルチモニタがサポートされている場合
+		// \x83}\x83\x8B\x83`\x83\x82\x83j\x83^\x82\xAA\x83T\x83|\x81[\x83g\x82\xB3\x82\xEA\x82Ă\xA2\x82\xE9\x8Fꍇ
 		HMONITOR hm;
 		MONITORINFO mi;
 		int ix, iy;
 
-		// 元の座標を保存しておく
+		// \x8C\xB3\x82̍\xC0\x95W\x82\xF0\x95ۑ\xB6\x82\xB5\x82Ă\xA8\x82\xAD
 		ix = point->x;
 		iy = point->y;
 
@@ -63,10 +63,10 @@
 		hm = MonitorFromPoint(*point, MONITOR_DEFAULTTONULL);
 		if (hm == NULL) {
 			if (NearestMonitor) {
-				// 最も近いモニタに表示する
+				// \x8Dł\xE0\x8B߂\xA2\x83\x82\x83j\x83^\x82ɕ\\x8E\xA6\x82\xB7\x82\xE9
 				hm = MonitorFromPoint(*point, MONITOR_DEFAULTTONEAREST);
 			} else {
-				// スクリーンからはみ出している場合はマウスのあるモニタに表示する
+				// \x83X\x83N\x83\x8A\x81[\x83\x93\x82\xA9\x82\xE7\x82͂ݏo\x82\xB5\x82Ă\xA2\x82\xE9\x8Fꍇ\x82̓}\x83E\x83X\x82̂\xA0\x82郂\x83j\x83^\x82ɕ\\x8E\xA6\x82\xB7\x82\xE9
 				GetCursorPos(point);
 				hm = MonitorFromPoint(*point, MONITOR_DEFAULTTONEAREST);
 			}
@@ -86,7 +86,7 @@
 	}
 	else
 	{
-		// マルチモニタがサポートされていない場合
+		// \x83}\x83\x8B\x83`\x83\x82\x83j\x83^\x82\xAA\x83T\x83|\x81[\x83g\x82\xB3\x82\xEA\x82Ă\xA2\x82Ȃ\xA2\x8Fꍇ
 		if (point->x < FrameWidth) {
 			point->x = FrameWidth;
 		}
@@ -96,15 +96,17 @@
 	}
 }
 
-/* リサイズ用ツールチップを表示する
+/* \x83\x8A\x83T\x83C\x83Y\x97p\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9
  *
- * 引数:
- *   src        ウィンドウハンドル
- *   cx, cy     ツールチップに表示する縦横サイズ
- *   fwSide     リサイズ時にどこのウィンドウを掴んだか
- *   newX, newY リサイズ後の左上の座標
+ * \x88\xF8\x90\x94\x81F
+ *   src        \x83E\x83B\x83\x93\x83h\x83E\x83n\x83\x93\x83h\x83\x8B
+ *   cx, cy     \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82ɕ\\x8E\xA6\x82\xB7\x82\xE9\x8Fc\x89\xA1\x83T\x83C\x83Y
+ *   fwSide     \x83\x8A\x83T\x83C\x83Y\x8E\x9E\x82ɂǂ\xB1\x82̃E\x83B\x83\x93\x83h\x83E\x82\xF0\x92͂񂾂\xA9
+ *   newX, newY \x83\x8A\x83T\x83C\x83Y\x8C\xE3\x82̍\xB6\x8F\xE3\x82̍\xC0\x95W
  *
- * 注意: Windows9x では動作しない
+ * \x92\x8D\x88\xD3: 
+ * Windows9x\x82ł͉\xE6\x96ʂ̃v\x83\x8D\x83p\x83e\x83B\x82Łu\x83E\x83B\x83\x93\x83h\x83E\x82̓\xE0\x97e\x82\xF0\x95\\x8E\xA6\x82\xB5\x82\xBD\x82܂\xDC
+ * \x83h\x83\x89\x83b\x83O\x82\xB7\x82\xE9\x81v\x82Ƀ`\x83F\x83b\x83N\x82\xF0\x93\xFC\x82\xEA\x82Ȃ\xA2\x82ƁA\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xAA\x95\\x8E\xA6\x82\xB3\x82\xEA\x82܂\xB9\x82\xF1\x81B
  */
 void UpdateSizeTip(HWND src, int cx, int cy, UINT fwSide, int newX, int newY)
 {
@@ -117,8 +119,8 @@
 	/* Generate the tip text */
 	_stprintf_s(str, _countof(str), _T("%dx%d"), cx, cy);
 
-	// ウィンドウの右、右下、下を掴んだ場合は、ツールチップを左上隅に配置する。
-	// それら以外はリサイズ後の左上隅に配置する。
+	// \x83E\x83B\x83\x93\x83h\x83E\x82̉E\x81A\x89E\x89\xBA\x81A\x89\xBA\x82\xF0\x92͂񂾏ꍇ\x82́A\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xF0\x8D\xB6\x8F\xE3\x8B\xF7\x82ɔz\x92u\x82\xB7\x82\xE9\x81B
+	// \x82\xBB\x82\xEA\x82\xE7\x88ȊO\x82̓\x8A\x83T\x83C\x83Y\x8C\xE3\x82̍\xB6\x8F\xE3\x8B\xF7\x82ɔz\x92u\x82\xB7\x82\xE9\x81B
 	if (!(fwSide == WMSZ_RIGHT || fwSide == WMSZ_BOTTOMRIGHT || fwSide == WMSZ_BOTTOM)) {
 		tooltip_movable = 1;
 	}
@@ -128,14 +130,14 @@
 		POINT point;
 		int w, h;
 
-		// 文字列の縦横サイズを取得する
+		// \x95\xB6\x8E\x9A\x97\xF1\x82̏c\x89\xA1\x83T\x83C\x83Y\x82\xF0\x8E擾\x82\xB7\x82\xE9
 		TipWinGetTextWidthHeight(src, str, &w, &h);
 
-		// ウィンドウの位置を取得
+		// \x83E\x83B\x83\x93\x83h\x83E\x82̈ʒu\x82\xF0\x8E擾
 		GetWindowRect(src, &wr);
 
-		// sizetipを出す位置は、ウィンドウ左上(X, Y)に対して、
-		// (X, Y - 文字列の高さ - FRAME_WIDTH * 2) とする。
+		// sizetip\x82\xF0\x8Fo\x82\xB7\x88ʒu\x82́A\x83E\x83B\x83\x93\x83h\x83E\x8D\xB6\x8F\xE3(X, Y)\x82ɑ΂\xB5\x82āA
+		// (X, Y - \x95\xB6\x8E\x9A\x97\xF1\x82̍\x82\x82\xB3 - FRAME_WIDTH * 2) \x82Ƃ\xB7\x82\xE9\x81B
 		point.x = wr.left;
 		point.y = wr.top - (h + FRAME_WIDTH * 2);
 		FixPosFromFrame(&point, 16, FALSE);
@@ -142,7 +144,9 @@
 		cx = point.x;
 		cy = point.y;
 
-		SizeTip = TipWinCreate(src, cx, cy, str);
+		SizeTip = TipWinCreate(src);
+		TipWinSetPos(SizeTip, cx, cy);
+		TipWinSetText(SizeTip, str);
 
 		//OutputDebugPrintf("Created: (%d,%d)\n", cx, cy);
 
@@ -153,7 +157,7 @@
 
 		//OutputDebugPrintf("Updated: (%d,%d)\n", cx, cy);
 
-		// ウィンドウの左上が移動する場合
+		// \x83E\x83B\x83\x93\x83h\x83E\x82̍\xB6\x8Fオ\x88ړ\xAE\x82\xB7\x82\xE9\x8Fꍇ
 		if (tooltip_movable) {
 			TipWinSetPos(SizeTip, newX + FRAME_WIDTH*2, newY + FRAME_WIDTH*2);
 			//OutputDebugPrintf("Moved: (%d,%d)\n", newX, newY);

Modified: branches/unicode_buf/teraterm/teraterm/tekwin.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/tekwin.cpp	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/tekwin.cpp	2019-10-02 15:09:00 UTC (rev 8253)
@@ -636,6 +636,7 @@
 
 LRESULT CTEKWindow::OnDlgHelp(WPARAM wParam, LPARAM lParam)
 {
+	DWORD help_id = (wParam == 0) ? HelpId : wParam;
 	OpenHelp(HH_HELP_CONTEXT, HelpId, ts.UILanguageFile);
 	return 0;
 }
@@ -779,6 +780,9 @@
 {
 	LRESULT retval = 0;
 	if (msg == MsgDlgHelp) {
+		// HELPMSGSTRING message \x8E\x9E
+		//		wp = dialog handle
+		//		lp = initialization structure
 		OnDlgHelp(wp, lp);
 		return 0;
 	}

Modified: branches/unicode_buf/teraterm/teraterm/tekwin.h
===================================================================
--- branches/unicode_buf/teraterm/teraterm/tekwin.h	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/tekwin.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -38,6 +38,7 @@
   TTEKVar tk;
   HMENU MainMenu, EditMenu, WinMenu,
     FileMenu, SetupMenu, HelpMenu;
+  LONG HelpId;
 
 public:
 	CTEKWindow(HINSTANCE hInstance);

Modified: branches/unicode_buf/teraterm/teraterm/ttermpro.rc
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttermpro.rc	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttermpro.rc	2019-10-02 15:09:00 UTC (rev 8253)
@@ -151,12 +151,12 @@
 FONT 8, "Tahoma", 0, 0, 0x0
 BEGIN
     LTEXT           "Window Opacity",IDC_ALPHABLEND,5,5,78,8
-    LTEXT           "&Active",IDC_ALPHA_BLEND_ACTIVE_LABEL,7,17,60,8
+    LTEXT           "&Active",IDC_ALPHA_BLEND_ACTIVE_LABEL,7,17,60,12
     EDITTEXT        IDC_ALPHA_BLEND_ACTIVE,69,16,19,12,ES_AUTOHSCROLL | ES_NUMBER
-    CONTROL         "", IDC_ALPHA_BLEND_ACTIVE_TRACKBAR, "msctls_trackbar32", WS_TABSTOP | TBS_BOTH | TBS_NOTICKS, 4, 27, 89, 12
-    LTEXT           "Ina&ctive",IDC_ALPHA_BLEND_INACTIVE_LABEL,7,41,60,8
-    EDITTEXT        IDC_ALPHA_BLEND_INACTIVE,69,40,19,12,ES_AUTOHSCROLL | ES_NUMBER
-    CONTROL         "", IDC_ALPHA_BLEND_INACTIVE_TRACKBAR, "msctls_trackbar32", WS_TABSTOP | TBS_BOTH | TBS_NOTICKS, 4, 51, 89, 12
+    CONTROL         "", IDC_ALPHA_BLEND_ACTIVE_TRACKBAR, "msctls_trackbar32", WS_TABSTOP | TBS_BOTH | TBS_NOTICKS, 4, 30, 89, 12
+    LTEXT           "Ina&ctive",IDC_ALPHA_BLEND_INACTIVE_LABEL,7,45,60,12
+    EDITTEXT        IDC_ALPHA_BLEND_INACTIVE,69,44,19,12,ES_AUTOHSCROLL | ES_NUMBER
+    CONTROL         "", IDC_ALPHA_BLEND_INACTIVE_TRACKBAR, "msctls_trackbar32", WS_TABSTOP | TBS_BOTH | TBS_NOTICKS, 4, 58, 89, 12
     GROUPBOX        "",IDC_STATIC,97,2,155,70
     CONTROL         "&Eterm lookfeel(*)",IDC_ETERM_LOOKFEEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,99,8,66,12
     CONTROL         "Mixed &ThemeFile to Background",IDC_MIXED_THEME_FILE,
@@ -166,12 +166,12 @@
     CONTROL         "Background &Image",IDC_BGIMG_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,40,73,10
     EDITTEXT        IDC_BGIMG_EDIT,103,51,108,14,ES_AUTOHSCROLL
     PUSHBUTTON      "...",IDC_BGIMG_BUTTON,217,51,14,14
-    LTEXT           "&Mouse cursor",IDC_MOUSE,5,67,70,8
-    COMBOBOX        IDC_MOUSE_CURSOR,13,76,80,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    RTEXT           "&Font Quality",IDC_FONT_QUALITY_LABEL,102,78,61,8
-    COMBOBOX        IDC_FONT_QUALITY,167,76,80,52,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    LTEXT           "AN&SI color",IDC_ANSICOLOR,5,94,43,8
-    LISTBOX         IDC_ANSI_COLOR,15,105,28,51,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "&Mouse cursor",IDC_MOUSE,5,72,70,8
+    COMBOBOX        IDC_MOUSE_CURSOR,13,81,80,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "&Font Quality",IDC_FONT_QUALITY_LABEL,102,82,61,12
+    COMBOBOX        IDC_FONT_QUALITY,167,81,80,52,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "AN&SI color",IDC_ANSICOLOR,5,95,43,8
+    LISTBOX         IDC_ANSI_COLOR,15,106,28,51,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
     LTEXT           "&Red",IDC_RED,45,108,22,8
     EDITTEXT        IDC_COLOR_RED,69,106,19,14,ES_AUTOHSCROLL | ES_NUMBER
     LTEXT           "&Green",IDC_GREEN,45,125,22,8

Modified: branches/unicode_buf/teraterm/teraterm/ttermpro.v10.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttermpro.v10.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttermpro.v10.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -63,7 +63,7 @@
     <ClCompile>
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <BrowseInformation>
@@ -109,7 +109,7 @@
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -213,6 +213,7 @@
     <ClInclude Include="..\common\tipwin.h" />
     <ClInclude Include="..\common\tektypes.h" />
     <ClInclude Include="..\common\teraterm.h" />
+    <ClInclude Include="..\common\tipwin.h" />
     <ClInclude Include="..\common\tmfc.h" />
     <ClInclude Include="..\common\tt-version.h" />
     <ClInclude Include="..\common\tt_res.h" />

Modified: branches/unicode_buf/teraterm/teraterm/ttermpro.v11.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttermpro.v11.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttermpro.v11.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -62,7 +62,7 @@
     <ClCompile>
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <BrowseInformation />
@@ -106,7 +106,7 @@
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -210,6 +210,7 @@
     <ClInclude Include="..\common\tipwin.h" />
     <ClInclude Include="..\common\tektypes.h" />
     <ClInclude Include="..\common\teraterm.h" />
+    <ClInclude Include="..\common\tipwin.h" />
     <ClInclude Include="..\common\tmfc.h" />
     <ClInclude Include="..\common\tt-version.h" />
     <ClInclude Include="..\common\tt_res.h" />

Modified: branches/unicode_buf/teraterm/teraterm/ttermpro.v12.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttermpro.v12.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttermpro.v12.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -62,7 +62,7 @@
     <ClCompile>
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <BrowseInformation />
@@ -106,7 +106,7 @@
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -210,6 +210,7 @@
     <ClInclude Include="..\common\tipwin.h" />
     <ClInclude Include="..\common\tektypes.h" />
     <ClInclude Include="..\common\teraterm.h" />
+    <ClInclude Include="..\common\tipwin.h" />
     <ClInclude Include="..\common\tmfc.h" />
     <ClInclude Include="..\common\tt-version.h" />
     <ClInclude Include="..\common\tt_res.h" />
@@ -281,4 +282,4 @@
       <UserProperties RESOURCE_FILE="ttermpro.rc" />
     </VisualStudio>
   </ProjectExtensions>
-</Project>
\ No newline at end of file
+</Project>

Modified: branches/unicode_buf/teraterm/teraterm/ttermpro.v14.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttermpro.v14.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttermpro.v14.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -64,7 +64,7 @@
     <ClCompile>
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <BrowseInformation />
@@ -108,7 +108,7 @@
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -212,6 +212,7 @@
     <ClInclude Include="..\common\tipwin.h" />
     <ClInclude Include="..\common\tektypes.h" />
     <ClInclude Include="..\common\teraterm.h" />
+    <ClInclude Include="..\common\tipwin.h" />
     <ClInclude Include="..\common\tmfc.h" />
     <ClInclude Include="..\common\tt-version.h" />
     <ClInclude Include="..\common\tt_res.h" />

Modified: branches/unicode_buf/teraterm/teraterm/ttermpro.v15.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttermpro.v15.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttermpro.v15.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -65,7 +65,7 @@
     <ClCompile>
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <BrowseInformation />
@@ -110,7 +110,7 @@
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -215,6 +215,7 @@
     <ClInclude Include="..\common\tipwin.h" />
     <ClInclude Include="..\common\tektypes.h" />
     <ClInclude Include="..\common\teraterm.h" />
+    <ClInclude Include="..\common\tipwin.h" />
     <ClInclude Include="..\common\tmfc.h" />
     <ClInclude Include="..\common\tt-version.h" />
     <ClInclude Include="..\common\tt_res.h" />
@@ -286,4 +287,4 @@
       <UserProperties RESOURCE_FILE="ttermpro.rc" />
     </VisualStudio>
   </ProjectExtensions>
-</Project>
+</Project>
\ No newline at end of file

Modified: branches/unicode_buf/teraterm/teraterm/ttermpro.v15.vcxproj.filters
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttermpro.v15.vcxproj.filters	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttermpro.v15.vcxproj.filters	2019-10-02 15:09:00 UTC (rev 8253)
@@ -312,5 +312,8 @@
     <ClInclude Include="..\common\tmfc.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\common\tipwin.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
 </Project>
\ No newline at end of file

Modified: branches/unicode_buf/teraterm/teraterm/ttermpro.v16.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttermpro.v16.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttermpro.v16.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -65,7 +65,7 @@
     <ClCompile>
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <BrowseInformation />
@@ -110,7 +110,7 @@
       <AdditionalOptions>/D"_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions)</AdditionalOptions>
       <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
-      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -215,6 +215,7 @@
     <ClInclude Include="..\common\tipwin.h" />
     <ClInclude Include="..\common\tektypes.h" />
     <ClInclude Include="..\common\teraterm.h" />
+    <ClInclude Include="..\common\tipwin.h" />
     <ClInclude Include="..\common\tmfc.h" />
     <ClInclude Include="..\common\tt-version.h" />
     <ClInclude Include="..\common\tt_res.h" />

Modified: branches/unicode_buf/teraterm/teraterm/ttermpro.v16.vcxproj.filters
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttermpro.v16.vcxproj.filters	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttermpro.v16.vcxproj.filters	2019-10-02 15:09:00 UTC (rev 8253)
@@ -312,5 +312,8 @@
     <ClInclude Include="..\common\tmfc.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\common\tipwin.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
 </Project>
\ No newline at end of file

Modified: branches/unicode_buf/teraterm/teraterm/ttermpro.v9.vcproj
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttermpro.v9.vcproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttermpro.v9.vcproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -51,7 +51,7 @@
 				Name="VCCLCompilerTool"
 				AdditionalOptions="/D"_CRT_SECURE_NO_DEPRECATE""
 				Optimization="0"
-				AdditionalIncludeDirectories="$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg"
+				AdditionalIncludeDirectories="$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
 				RuntimeLibrary="1"
 				BrowseInformation="0"
@@ -145,7 +145,7 @@
 				AdditionalOptions="/D"_CRT_SECURE_NO_DEPRECATE""
 				Optimization="2"
 				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg"
+				AdditionalIncludeDirectories="$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				StringPooling="true"
 				RuntimeLibrary="0"
@@ -450,6 +450,9 @@
 				>
 			</File>
 			<File
+				RelativePath="..\common\tipwin.h"
+				>
+			<File
 				RelativePath="..\common\tmfc.h"
 				>
 			</File>

Modified: branches/unicode_buf/teraterm/teraterm/ttermpro.vcproj
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttermpro.vcproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttermpro.vcproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -50,7 +50,7 @@
 				Name="VCCLCompilerTool"
 				AdditionalOptions="/D"_CRT_SECURE_NO_DEPRECATE""
 				Optimization="0"
-				AdditionalIncludeDirectories="$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg"
+				AdditionalIncludeDirectories="$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
 				RuntimeLibrary="1"
 				BrowseInformation="0"
@@ -145,7 +145,7 @@
 				AdditionalOptions="/D"_CRT_SECURE_NO_DEPRECATE""
 				Optimization="2"
 				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg"
+				AdditionalIncludeDirectories="$(SolutionDir)..\libs\SFMT;$(SolutionDir)..\libs\oniguruma\src;$(SolutionDir)common;$(SolutionDir)ttpfile;$(SolutionDir)ttpdlg;$(SolutionDir)ttpcmn"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				StringPooling="true"
 				RuntimeLibrary="0"
@@ -451,6 +451,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\common\tipwin.h"
+				>
+			</File>
+			<File
 				RelativePath="..\common\tmfc.h"
 				>
 			</File>

Modified: branches/unicode_buf/teraterm/teraterm/ttsetup.h
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttsetup.h	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttsetup.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -27,6 +27,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "ttlib.h"
+
 /* TERATERM.EXE, TTSET interface */
 #ifdef __cplusplus
 extern "C" {
@@ -62,6 +64,8 @@
 BOOL LoadTTSET();
 void FreeTTSET();
 
+int PASCAL SerialPortConfconvertId2Str(enum serial_port_conf type, WORD id, PCHAR str, int strlen);
+
 #ifdef __cplusplus
 }
 #endif

Modified: branches/unicode_buf/teraterm/teraterm/ttwinman.c
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttwinman.c	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttwinman.c	2019-10-02 15:09:00 UTC (rev 8253)
@@ -49,7 +49,6 @@
 
 /* 'help' button on dialog box */
 WORD MsgDlgHelp;
-LONG HelpId;
 
 TTTSet ts;
 TComVar cv;

Modified: branches/unicode_buf/teraterm/teraterm/ttwinman.h
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttwinman.h	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/ttwinman.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -49,7 +49,6 @@
 
 /* 'help' button on dialog box */
 extern WORD MsgDlgHelp;
-extern LONG HelpId;
 
 extern TTTSet ts;
 extern TComVar cv;

Modified: branches/unicode_buf/teraterm/teraterm/vtwin.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/vtwin.cpp	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/vtwin.cpp	2019-10-02 15:09:00 UTC (rev 8253)
@@ -146,9 +146,6 @@
 
 static int AutoDisconnectedPort = -1;
 
-static TipWin *OpacityTip;
-static POINT OpacityTipPts;
-
 #ifndef WM_IME_COMPOSITION
 #define WM_IME_COMPOSITION              0x010F
 #endif
@@ -181,13 +178,6 @@
 	}
 }
 
-static void DestroyTooltip(TipWin* *tooltip) {
-	if (*tooltip) {
-		TipWinDestroy(*tooltip);
-		(*tooltip) = NULL;
-	}
-}
-
 /**
  * @param[in]	alpha	0-255
  */
@@ -825,6 +815,9 @@
 #if UNICODE_DEBUG
 	CtrlKeyState = 0;
 #endif
+
+	// TipWin
+	TipWin = new CTipWin(HVTWin);
 }
 
 /////////////////////////////////////////////////////////////////////////////
@@ -1301,9 +1294,12 @@
 		}
 	}
 	else if (SubMenu == SetupMenu)
-		if (cv.Ready &&
-		    ((cv.PortType==IdTCPIP) || (cv.PortType==IdFile)) ||
-			(SendVar!=NULL) || (FileVar!=NULL) || Connecting) {
+		/*
+		 * \x83l\x83b\x83g\x83\x8F\x81[\x83N\x90ڑ\xB1\x92\x86(TCP/IP\x82\xF0\x91I\x91\xF0\x82\xB5\x82Đڑ\xB1\x82\xB5\x82\xBD\x8F\xF3\x91\xD4)\x82̓V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g
+		 * (ID_SETUP_SERIALPORT)\x82̃\x81\x83j\x83\x85\x81[\x82\xAA\x91I\x91\xF0\x82ł\xAB\x82Ȃ\xA2\x82悤\x82ɂȂ\xC1\x82Ă\xA2\x82\xBD\x82\xAA\x81A
+		 * \x82\xB1\x82̃K\x81[\x83h\x82\xF0\x8AO\x82\xB5\x81A\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x83_\x83C\x83A\x83\x8D\x83O\x82\xA9\x82\xE7\x90V\x82\xB5\x82\xA2\x90ڑ\xB1\x82\xAA\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB7\x82\xE9\x81B
+		 */
+		if ((SendVar!=NULL) || (FileVar!=NULL) || Connecting) {
 			EnableMenuItem(SetupMenu,ID_SETUP_SERIALPORT,MF_BYCOMMAND | MF_GRAYED);
 		}
 		else {
@@ -2328,13 +2324,12 @@
 {
 	wchar_t *buf = BuffGetCharInfo(client_x, client_y);
 	if (TipWinCodeDebug == NULL) {
-		TipWinCodeDebug = TipWinCreateW(m_hWnd, client_x, client_y, buf);
-	} else {
-		POINT pos = { client_x, client_y };
-		ClientToScreen(m_hWnd, &pos);
-		TipWinSetPos(TipWinCodeDebug, pos.x, pos.y);
-		TipWinSetTextW(TipWinCodeDebug, buf);
+		TipWinCodeDebug = TipWinCreate(m_hWnd);
 	}
+	POINT pos = { client_x, client_y };
+	ClientToScreen(m_hWnd, &pos);
+	TipWinSetPos(TipWinCodeDebug, pos.x, pos.y);
+	TipWinSetTextW(TipWinCodeDebug, buf);
 	free(buf);
 }
 
@@ -2409,6 +2404,7 @@
 			int newAlpha = Alpha;
 			TCHAR tipbuf[32];
 			TCHAR uimsg[MAX_UIMSG];
+			POINT tippos;
 
 			newAlpha += delta * ts.MouseWheelScrollLine;
 			if (newAlpha > 255)
@@ -2419,21 +2415,19 @@
 
 			get_lang_msg("TOOLTIP_TITLEBAR_OPACITY", uimsg, sizeof(uimsg), "Opacity %.1f %%", ts.UILanguageFile);
 			_stprintf_s(tipbuf, _countof(tipbuf), _T(uimsg), (newAlpha / 255.0) * 100);
-			::SetTimer(HVTWin, IdOpacityTipTimer, 1000, NULL);
 
-			if (OpacityTipPts.x != pt.x ||
-			    OpacityTipPts.y != pt.y) {
-				DestroyTooltip(&OpacityTip);
+			tippos = TipWin->GetPos();
+			if (tippos.x != pt.x ||
+			    tippos.y != pt.y) {
+					TipWin->SetVisible(FALSE);
 			}
 
-			if (OpacityTip == NULL) {
-				OpacityTip = TipWinCreate(HVTWin, pt.x, pt.y, tipbuf);
-				OpacityTipPts.x = pt.x;
-				OpacityTipPts.y = pt.y;
-			} else {
-				TipWinSetText(OpacityTip, tipbuf);
-				// \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82̃\x8A\x83T\x83C\x83Y\x82\xAA\x8E\xB8\x94s\x82\xB5\x82\xBD\x82悤\x82Ɍ\xA9\x82\xA6\x82\xE9\x96\xE2\x91\xE8\x82̎b\x92\xE8\x91΍\xF4
-				TipWinSetText(OpacityTip, tipbuf);
+			TipWin->SetText(tipbuf);
+			TipWin->SetPos(pt.x, pt.y);
+			TipWin->SetHideTimer(1000);
+
+			if(! TipWin->IsVisible()) {
+				TipWin->SetVisible(TRUE);
 			}
 
 			return TRUE;
@@ -2898,9 +2892,6 @@
 		case IdPrnProcTimer:
 			PrnFileDirectProc();
 			break;
-		case IdOpacityTipTimer:
-			DestroyTooltip(&OpacityTip);
-			break;
 	}
 }
 
@@ -3534,6 +3525,7 @@
 	if ((ts.LogFN[0]!=0) && (LogVar==NULL) && NewFileVar(&LogVar)) {
 		LogVar->DirLen = 0;
 		strncpy_s(LogVar->FullName, sizeof(LogVar->FullName), ts.LogFN, _TRUNCATE);
+		HelpId = HlpFileLog;
 		LogStart();
 	}
 
@@ -4655,6 +4647,9 @@
 void CVTWindow::OnSetupSerialPort()
 {
 	BOOL Ok;
+	char Command[MAXPATHLEN + HostNameMaxLength];
+	char Temp[MAX_PATH], Str[MAX_PATH];
+
 	HelpId = HlpSetupSerialPort;
 	if (! LoadTTDLG()) {
 		return;
@@ -4665,6 +4660,36 @@
 	FreeTTDLG();
 
 	if (Ok && ts.ComPort > 0) {
+		/* 
+		 * TCP/IP\x82ɂ\xE6\x82\xE9\x90ڑ\xB1\x92\x86\x82̏ꍇ\x82͐V\x8BK\x83v\x83\x8D\x83Z\x83X\x82Ƃ\xB5\x82ċN\x93\xAE\x82\xB7\x82\xE9\x81B
+		 * New connection\x82\xA9\x82\xE7\x83V\x83\x8A\x83A\x83\x8B\x90ڑ\xB1\x82\xB7\x82铮\x8D\xEC\x82Ɗ\xEE\x96{\x93I\x82ɓ\xAF\x82\xB6\x93\xAE\x8D\xEC\x82ƂȂ\xE9\x81B
+		 */
+		if ( cv.Ready && (cv.PortType != IdSerial) ) {
+			_snprintf_s(Command, sizeof(Command), 
+				"ttermpro /C=%u /SPEED=%lu /CDELAYPERCHAR=%u /CDELAYPERLINE=%u ",
+				ts.ComPort, ts.Baud, ts.DelayPerChar, ts.DelayPerLine);
+
+			if (SerialPortConfconvertId2Str(COM_DATABIT, ts.DataBit, Temp, sizeof(Temp))) {
+				_snprintf_s(Str, sizeof(Str), _TRUNCATE, "/CDATABIT=%s ", Temp);
+				strncat_s(Command, sizeof(Command), Str, _TRUNCATE);
+			}
+			if (SerialPortConfconvertId2Str(COM_PARITY, ts.Parity, Temp, sizeof(Temp))) {
+				_snprintf_s(Str, sizeof(Str), _TRUNCATE, "/CPARITY=%s ", Temp);
+				strncat_s(Command, sizeof(Command), Str, _TRUNCATE);
+			}
+			if (SerialPortConfconvertId2Str(COM_STOPBIT, ts.StopBit, Temp, sizeof(Temp))) {
+				_snprintf_s(Str, sizeof(Str), _TRUNCATE, "/CSTOPBIT=%s ", Temp);
+				strncat_s(Command, sizeof(Command), Str, _TRUNCATE);
+			}
+			if (SerialPortConfconvertId2Str(COM_FLOWCTRL, ts.Flow, Temp, sizeof(Temp))) {
+				_snprintf_s(Str, sizeof(Str), _TRUNCATE, "/CFLOWCTRL=%s ", Temp);
+				strncat_s(Command, sizeof(Command), Str, _TRUNCATE);
+			}
+
+			WinExec(Command,SW_SHOW);
+			return;
+		}
+
 		if (cv.Open) {
 			if (ts.ComPort != cv.ComPort) {
 				CommClose(&cv);
@@ -6245,7 +6270,10 @@
 {
 	LRESULT retval = 0;
 	if (msg == MsgDlgHelp) {
-		OnDlgHelp(wp,lp);
+		// HELPMSGSTRING message \x8E\x9E
+		//		wp = dialog handle
+		//		lp = initialization structure
+		OnDlgHelp(0, 0);
 		return 0;
 	}
 	switch(msg)

Modified: branches/unicode_buf/teraterm/teraterm/vtwin.h
===================================================================
--- branches/unicode_buf/teraterm/teraterm/vtwin.h	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/teraterm/vtwin.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -30,7 +30,7 @@
 /* TERATERM.EXE, VT window */
 
 #ifdef __cplusplus
-
+#include "tipwin.h"
 #include "tmfc.h"
 #include "unicode_test.h"
 #include "tipwin.h"
@@ -73,6 +73,11 @@
   DWORD CtrlKeyDownTick;	// \x8Dŏ\x89\x82ɉ\x9F\x82\xB5\x82\xBDtick
 #endif
 
+  // TipWin
+  CTipWin* TipWin;
+
+  LONG HelpId;
+
 public:
 	CVTWindow(HINSTANCE hInstance);
 	int Parse();

Modified: branches/unicode_buf/teraterm/ttpcmn/CMakeLists.txt
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/CMakeLists.txt	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpcmn/CMakeLists.txt	2019-10-02 15:09:00 UTC (rev 8253)
@@ -37,6 +37,10 @@
   language.c
   language.h
   ttcmn.c
+  comportinfo.cpp
+  comportinfo.h
+  comportinfo.cpp
+  devpkey_teraterm.h
   ttpcmn-version.rc
   ttpcmn.def
   ${COMMON_SRC}

Added: branches/unicode_buf/teraterm/ttpcmn/comportinfo.cpp
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/comportinfo.cpp	                        (rev 0)
+++ branches/unicode_buf/teraterm/ttpcmn/comportinfo.cpp	2019-10-02 15:09:00 UTC (rev 8253)
@@ -0,0 +1,421 @@
+/*
+ * Copyright (C) 2019 TeraTerm Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// for comportinfo_test
+//#define TEST_FOR_NT
+//#define TEST_FOR_9X
+
+#include <windows.h>
+#include <devguid.h>
+#include <setupapi.h>
+#include <tchar.h>
+#include <stdio.h>
+#define _CRTDBG_MAP_ALLOC
+#include <crtdbg.h>
+
+#include "devpkey_teraterm.h"
+#include "ttlib.h"
+#include "codeconv.h"
+
+#define DllExport __declspec(dllexport)
+#include "comportinfo.h"
+
+typedef BOOL (WINAPI *TSetupDiGetDevicePropertyW)(
+	HDEVINFO DeviceInfoSet,
+	PSP_DEVINFO_DATA DeviceInfoData,
+	const DEVPROPKEY *PropertyKey,
+	DEVPROPTYPE *PropertyType,
+	PBYTE PropertyBuffer,
+	DWORD PropertyBufferSize,
+	PDWORD RequiredSize,
+	DWORD Flags
+	);
+
+typedef BOOL (WINAPI *TSetupDiGetDeviceRegistryPropertyW)(
+	HDEVINFO DeviceInfoSet,
+	PSP_DEVINFO_DATA DeviceInfoData,
+	DWORD Property,
+	PDWORD PropertyRegDataType,
+	PBYTE PropertyBuffer,
+	DWORD PropertyBufferSize,
+	PDWORD RequiredSize
+	);
+
+typedef LONG (WINAPI *TRegQueryValueExW)(
+	HKEY hKey,
+	LPCWSTR lpValueName,
+	LPDWORD lpReserved,
+	LPDWORD lpType,
+	LPBYTE lpData,
+	LPDWORD lpcbData
+	);
+
+static BOOL IsWindows9X()
+{
+	return !IsWindowsNTKernel();
+}
+
+/**
+ *	\x83|\x81[\x83g\x96\xBC\x82\xF0\x8E擾
+ */
+static BOOL GetComPortName(HDEVINFO hDevInfo, SP_DEVINFO_DATA *DeviceInfoData, wchar_t **str)
+{
+	TRegQueryValueExW pRegQueryValueExW =
+		(TRegQueryValueExW)GetProcAddress(
+			GetModuleHandleA("ADVAPI32.dll"), "RegQueryValueExW");
+	DWORD byte_len;
+	DWORD dwType = REG_SZ;
+	HKEY hKey = SetupDiOpenDevRegKey(hDevInfo,
+									 DeviceInfoData,
+									 DICS_FLAG_GLOBAL,
+									 0, DIREG_DEV, KEY_READ);
+	if (hKey == NULL){
+		// \x83|\x81[\x83g\x96\xBC\x82\xAA\x8E擾\x82ł\xAB\x82Ȃ\xA2?
+		*str = NULL;
+		return FALSE;
+	}
+
+	wchar_t* port_name = NULL;
+	long r;
+	if (pRegQueryValueExW != NULL && !IsWindows9X()) {
+		// 9x\x8Cn\x82ł͂\xA4\x82܂\xAD\x93\xAE\x8D삵\x82Ȃ\xA2
+		r = pRegQueryValueExW(hKey, L"PortName", 0,
+			&dwType, NULL, &byte_len);
+		port_name = (wchar_t* )malloc(byte_len);
+		r = pRegQueryValueExW(hKey, L"PortName", 0,
+								&dwType, (LPBYTE)port_name, &byte_len);
+	} else {
+		r = RegQueryValueExA(hKey, "PortName", 0,
+								&dwType, (LPBYTE)NULL, &byte_len);
+		char *port_name_a = (char *)malloc(byte_len);
+		r = RegQueryValueExA(hKey, "PortName", 0,
+								&dwType, (LPBYTE)port_name_a, &byte_len);
+		if (r == ERROR_SUCCESS) {
+			size_t len_w = MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS,
+											   port_name_a, byte_len,
+											   NULL, 0);
+			port_name = (wchar_t *)malloc(sizeof(wchar_t) * len_w);
+			MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS,
+								port_name_a, byte_len,
+								port_name, (int)len_w);
+		}
+		free(port_name_a);
+	}
+	RegCloseKey(hKey);
+	if (r != ERROR_SUCCESS) {
+		free(port_name);
+		*str = NULL;
+		return FALSE;
+	}
+	*str = port_name;
+	return TRUE;
+}
+
+/**
+ *	\x83v\x83\x8D\x83p\x83e\x83B\x8E擾
+ *
+ * \x83\x8C\x83W\x83X\x83g\x83\x8A\x82̏ꏊ(Windows10)
+ * HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{GUID}\0000
+ *
+ */
+static void GetComPropartys(HDEVINFO hDevInfo, SP_DEVINFO_DATA *DeviceInfoData, const char *lang,
+							wchar_t **friendly_name, wchar_t **str)
+{
+	const char *FriendlyNameString = "FRIENDLY_NAME";
+	const char *DriverDateString = "DRIVER_DATE";
+	typedef struct {
+		const wchar_t *name;  // \x96{\x8A֐\x94\x93\xE0\x82Ŏg\x82\xA4
+		const char *key;      // \x96{\x8A֐\x94\x93\xE0\x82Ŏg\x82\xA4
+		const DEVPROPKEY *PropertyKey; // \x83\x8C\x83W\x83X\x83g\x83\x8A\x8E擾\x82Ɏg\x82\xA4\x82̂͂\xB1\x82\xEA\x82̂\xDD
+		DWORD Property;       // \x96\xA2\x8Eg\x97p
+	} list_t;
+	static const list_t list[] = {
+		{ L"Device Friendly Name",
+		  FriendlyNameString,
+		  &DEVPKEY_Device_FriendlyName,
+		  SPDRP_FRIENDLYNAME },
+		{ L"Device Instance ID",
+		  "DEVICE_INSTANCE_ID",
+		  &DEVPKEY_Device_InstanceId,
+		  SPDRP_MAXIMUM_PROPERTY },
+		{ L"Device Manufacturer",
+		  "DEVICE_MANUFACTURER",
+		  &DEVPKEY_Device_Manufacturer,
+		  SPDRP_MFG },
+		{ L"Provider Name",
+		  "PROVIDER_NAME",
+		  &DEVPKEY_Device_DriverProvider,
+		  SPDRP_MAXIMUM_PROPERTY },
+		{ L"Driver Date",
+		  DriverDateString,
+		  &DEVPKEY_Device_DriverDate,
+		  SPDRP_MAXIMUM_PROPERTY },
+		{ L"Driver Version",
+		  "DRIVER_VERSION",
+		  &DEVPKEY_Device_DriverVersion,
+		  SPDRP_MAXIMUM_PROPERTY },
+	};
+	TSetupDiGetDevicePropertyW pSetupDiGetDevicePropertyW =
+		(TSetupDiGetDevicePropertyW)GetProcAddress(
+			GetModuleHandleA("Setupapi.dll"),
+			"SetupDiGetDevicePropertyW");
+	TSetupDiGetDeviceRegistryPropertyW pSetupDiGetDeviceRegistryPropertyW =
+		(TSetupDiGetDeviceRegistryPropertyW)GetProcAddress(
+			GetModuleHandleA("Setupapi.dll"),
+			"SetupDiGetDeviceRegistryPropertyW");
+
+	wchar_t *s = _wcsdup(L"");
+	size_t len = 0;
+	for (size_t i = 0; i < _countof(list); i++) {
+		const list_t *p = &list[i];
+		BOOL r;
+		wchar_t *str_prop = NULL;
+		DWORD size;
+
+		if (pSetupDiGetDevicePropertyW != NULL) {
+			DEVPROPTYPE ulPropertyType;
+			pSetupDiGetDevicePropertyW(hDevInfo, DeviceInfoData, p->PropertyKey,
+									   &ulPropertyType, NULL, 0, &size, 0);
+			str_prop = (wchar_t *)malloc(size);
+			r = pSetupDiGetDevicePropertyW(hDevInfo, DeviceInfoData, p->PropertyKey,
+										   &ulPropertyType, (PBYTE)str_prop, size, &size, 0);
+		} else if (p->PropertyKey == &DEVPKEY_Device_InstanceId) {
+			// InstanceId\x82\xCDA\x8Cn\x82Ō\x88\x82ߑł\xBF
+			DWORD len_a;
+			SetupDiGetDeviceInstanceIdA(hDevInfo,
+										DeviceInfoData,
+										NULL, 0,
+										&len_a);
+			char *str_instance_a = (char *)malloc(len_a);
+			r = SetupDiGetDeviceInstanceIdA(hDevInfo,
+											DeviceInfoData,
+											str_instance_a, len_a,
+											&len_a);
+			if (r != FALSE) {
+				int len_w = MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS,
+												str_instance_a, len_a,
+												NULL, 0);
+				str_prop = (wchar_t *)malloc(sizeof(wchar_t) * len_w);
+				MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS,
+									str_instance_a, len_a,
+									str_prop, (int)len_w);
+			}
+			free(str_instance_a);
+		} else if (p->Property == SPDRP_MAXIMUM_PROPERTY) {
+			r = FALSE;
+		} else if (pSetupDiGetDeviceRegistryPropertyW != NULL && !IsWindows9X()) {
+			// 9x\x8Cn\x82ł͂\xA4\x82܂\xAD\x93\xAE\x8D삵\x82Ȃ\xA2
+			DWORD dwPropType;
+			r = pSetupDiGetDeviceRegistryPropertyW(hDevInfo,
+												   DeviceInfoData,
+												   p->Property,
+												   &dwPropType,
+												   NULL, 0,
+												   &size);
+			str_prop = (wchar_t *)malloc(size);
+			r = pSetupDiGetDeviceRegistryPropertyW(hDevInfo,
+												   DeviceInfoData,
+												   p->Property,
+												   &dwPropType,
+												   (LPBYTE)str_prop, size,
+												   &size);
+		} else {
+			DWORD dwPropType;
+			DWORD len_a;
+			r = SetupDiGetDeviceRegistryPropertyA(hDevInfo,
+												  DeviceInfoData,
+												  p->Property,
+												  &dwPropType,
+												  NULL, 0,
+												  &len_a);
+			char *str_prop_a = (char *)malloc(len_a);
+			r = SetupDiGetDeviceRegistryPropertyA(hDevInfo,
+												  DeviceInfoData,
+												  p->Property,
+												  &dwPropType,
+												  (PBYTE)str_prop_a, len_a,
+												  &len_a);
+			if (r != FALSE) {
+				int len_w = MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS,
+												str_prop_a, len_a,
+												NULL, 0);
+				str_prop = (wchar_t *)malloc(sizeof(wchar_t) * len_w);
+				MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS,
+									str_prop_a, len_a,
+									str_prop, (int)len_w);
+			}
+			free(str_prop_a);
+		}
+		if (r != FALSE) {
+			/* Driver Date\x82\xCD DEVPROP_TYPE_FILETIME \x82ł\xA0\x82邽\x82߁A
+			 * FILETIME \x8D\\x91\xA2\x91̂\xCC8\x83o\x83C\x83g\x82ŕԂ邽\x82߁ASYSTEMTIME \x82ɕϊ\xB7\x82\xB7\x82\xE9\x81B
+			 */
+			if (strcmp(list[i].key, DriverDateString) == 0) {
+				FILETIME ftFileTime;
+				SYSTEMTIME stFileTime;
+				int wbuflen = 64;
+				int buflen = sizeof(wchar_t) * wbuflen;
+
+				ZeroMemory(&ftFileTime, sizeof(FILETIME));
+				if (sizeof(ftFileTime) >= size) {
+					// str_prop\x82\xCDsize\x83o\x83C\x83g
+					memcpy(&ftFileTime, str_prop, size);  
+				}
+				ZeroMemory(&stFileTime, sizeof(SYSTEMTIME));
+				FileTimeToSystemTime(&ftFileTime , &stFileTime);
+				str_prop = (wchar_t *)realloc(str_prop, buflen);
+				_snwprintf_s(str_prop, wbuflen, _TRUNCATE, L"%d-%d-%d",
+					stFileTime.wMonth, stFileTime.wDay, stFileTime.wYear				
+					);
+			}
+
+			size_t name_len = wcslen(p->name);
+			size_t prop_len = wcslen(str_prop);
+			len = len + (name_len + (i==0?1:2) + 2 + 2 + prop_len);
+			s = (wchar_t *)realloc(s, sizeof(wchar_t) * len);
+			if (i != 0) 
+				wcscat_s(s, len, L"\r\n");
+			wcscat_s(s, len, p->name);
+			wcscat_s(s, len, L": ");
+			wcscat_s(s, len, str_prop);
+		}
+
+		if (strcmp(list[i].key, FriendlyNameString) == 0) {
+			// str_prop\x82̃\x81\x83\x82\x83\x8A\x82\xCD ComPortInfoFree() \x82ʼn\xF0\x95\xFA\x82\xB3\x82\xEA\x82\xE9\x81B
+			*friendly_name = str_prop;
+
+		} else {
+			// s \x82ɃR\x83s\x81[\x82\xB5\x82\xBD\x82̂\xC5str_prop\x82̃\x81\x83\x82\x83\x8A\x82͕s\x97v\x82ƂȂ\xE9\x81B
+			if (str_prop != NULL) {
+				free(str_prop);
+			}
+		}
+	}
+
+	*str = s;
+}
+
+/* \x94z\x97\xF1\x83\\x81[\x83g\x97p */
+static int sort_sub(const void *a_, const void *b_)
+{
+	const ComPortInfo_t *a = (ComPortInfo_t *)a_;
+	const ComPortInfo_t *b = (ComPortInfo_t *)b_;
+	if (wcsncmp(a->port_name, L"COM", 3) == 0 &&
+		wcsncmp(b->port_name, L"COM", 3) == 0) {
+		int a_no = _wtoi(&a->port_name[3]);
+		int b_no = _wtoi(&b->port_name[3]);
+		return a_no > b_no;
+	}
+	return wcscmp(a->port_name, b->port_name);
+}
+
+/**
+ *	com\x83|\x81[\x83g\x82̏\xEE\x95\xF1\x82\xF0\x8E擾\x82\xB7\x82\xE9
+ *
+ *	@param[out]	count	 	\x8F\xEE\x95\xF1\x90\x94(0\x82̂Ƃ\xABcom\x83|\x81[\x83g\x82Ȃ\xB5)
+ *	@return		\x8F\xEE\x95\xF1\x82ւ̃|\x83C\x83\x93\x83^(\x94z\x97\xF1)\x81A\x83|\x81[\x83g\x94ԍ\x86\x82̏\xAC\x82\xB3\x82\xA2\x8F\x87
+ *				NULL\x82̂Ƃ\xABcom\x83|\x81[\x83g\x82Ȃ\xB5
+ *				\x8Eg\x97p\x8C\xE3ComPortInfoFree()\x82\xF0\x8CĂԂ\xB1\x82\xC6
+ */
+ComPortInfo_t * WINAPI ComPortInfoGet(int *count, const char *lang)
+{
+	int comport_count = 0;
+	ComPortInfo_t *comport_infos = NULL;
+	const GUID *pClassGuid = &GUID_DEVCLASS_PORTS;
+
+	// List all connected serial devices
+	HDEVINFO hDevInfo = SetupDiGetClassDevsA(pClassGuid, NULL, NULL, DIGCF_PRESENT | DIGCF_PROFILE);
+	if (hDevInfo == INVALID_HANDLE_VALUE) {
+		*count = 0;
+		return NULL;
+	}
+
+	// Find the ones that are driverless
+	for (int i = 0; ; i++) {
+		SP_DEVINFO_DATA DeviceInfoData;
+		DeviceInfoData.cbSize = sizeof (DeviceInfoData);
+		if (!SetupDiEnumDeviceInfo(hDevInfo, i, &DeviceInfoData))
+			break;
+
+		// \x83|\x81[\x83g\x96\xBC\x8E擾 ("COM1"\x82Ȃ\xC7)
+		wchar_t *port_name;
+		if (!GetComPortName(hDevInfo, &DeviceInfoData, &port_name)) {
+			continue;
+		}
+		int port_no = 0;
+		if (wcsncmp(port_name, L"COM", 3) == 0) {
+			port_no = _wtoi(port_name+3);
+		}
+
+		// \x8F\xEE\x95\xF1\x8E擾
+		wchar_t *str_friendly_name = NULL;
+		wchar_t *str_prop = NULL;
+		GetComPropartys(hDevInfo, &DeviceInfoData, lang, &str_friendly_name, &str_prop);
+
+		comport_count++;
+		comport_infos = (ComPortInfo_t *)realloc(comport_infos,
+								sizeof(ComPortInfo_t) * comport_count);
+		ComPortInfo_t *p = &comport_infos[comport_count-1];
+		p->port_name = port_name;  // COM\x83|\x81[\x83g\x96\xBC
+		p->port_no = port_no;  // COM\x83|\x81[\x83g\x94ԍ\x86
+		p->friendly_name = str_friendly_name;  // Device Description
+		p->property = str_prop;  // \x91S\x8Fڍ׏\xEE\x95\xF1
+
+#if 0
+		{
+		char *a, *b, *c;
+		a = ToCharW(p->port_name);
+		b = ToCharW(p->friendly_name);
+		c = ToCharW(p->property);
+		OutputDebugPrintf("%s: [%s] [%d] [%s] [%s]\n", __FUNCTION__,
+			a, p->port_no, b, c
+			);
+		free(a);
+		free(b);
+		free(c);
+		}
+#endif
+	}
+
+	/* \x83|\x81[\x83g\x96\xBC\x8F\x87\x82ɕ\xC0\x82ׂ\xE9 */
+	qsort(comport_infos, comport_count, sizeof(comport_infos[0]), sort_sub);
+
+	*count = comport_count;
+	return comport_infos;
+}
+
+void WINAPI ComPortInfoFree(ComPortInfo_t *info, int count)
+{
+	for (int i=0; i< count; i++) {
+		ComPortInfo_t *p = &info[i];
+		free(p->port_name);
+		free(p->friendly_name);
+		free(p->property);
+	}
+	free(info);
+}

Copied: branches/unicode_buf/teraterm/ttpcmn/comportinfo.h (from rev 8252, branches/unicode_buf/teraterm/teraterm/ttwinman.h)
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/comportinfo.h	                        (rev 0)
+++ branches/unicode_buf/teraterm/ttpcmn/comportinfo.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2019 TeraTerm Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <windows.h>	// for WORD
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(DllExport)
+#define DllExport __declspec(dllimport)
+#endif
+
+typedef struct {
+	wchar_t *port_name;			// \x83|\x81[\x83g\x96\xBC
+	int port_no;				// 0..128(9x)/255(xp)
+	wchar_t *friendly_name;
+	wchar_t *property;
+} ComPortInfo_t;
+
+DllExport ComPortInfo_t * WINAPI ComPortInfoGet(int *count, const char *lang);
+DllExport void WINAPI ComPortInfoFree(ComPortInfo_t *info, int count);
+
+#ifdef __cplusplus
+}
+#endif

Added: branches/unicode_buf/teraterm/ttpcmn/devpkey_teraterm.h
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/devpkey_teraterm.h	                        (rev 0)
+++ branches/unicode_buf/teraterm/ttpcmn/devpkey_teraterm.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2019 TeraTerm Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+/*
+ * Visual Studio 2005\x82Ńr\x83\x8B\x83h\x82\xF0\x92ʂ\xB7\x82\xBD\x82߂ɂ͉\xBA\x8BL\x82̒\xE8\x8B`\x82\xAA\x95K\x97v\x81B
+ * Visual Studio 2019\x82ł͕s\x97v\x81B
+ */
+#if _MSC_VER == 1400
+typedef ULONG DEVPROPTYPE, *PDEVPROPTYPE;
+
+typedef GUID  DEVPROPGUID, *PDEVPROPGUID;
+typedef ULONG DEVPROPID,   *PDEVPROPID;
+
+typedef struct _DEVPROPKEY {
+    DEVPROPGUID fmtid;
+    DEVPROPID   pid;
+} DEVPROPKEY, *PDEVPROPKEY;
+#endif
+
+#undef DEFINE_DEVPROPKEY
+#define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const DEVPROPKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }, pid }
+
+/*
+ * Platform SDK\x82\xCCdevpkey.h\x82\xE6\x82\xE8
+ */
+
+DEFINE_DEVPROPKEY(DEVPKEY_Device_FriendlyName,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14);    // DEVPROP_TYPE_STRING
+DEFINE_DEVPROPKEY(DEVPKEY_Device_InstanceId,             0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 256);   // DEVPROP_TYPE_STRING
+DEFINE_DEVPROPKEY(DEVPKEY_Device_Manufacturer,           0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 13);    // DEVPROP_TYPE_STRING
+DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverProvider,           0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 9);     // DEVPROP_TYPE_STRING
+DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverDate,               0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 2);     // DEVPROP_TYPE_FILETIME
+DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverVersion,            0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 3);     // DEVPROP_TYPE_STRING
+

Modified: branches/unicode_buf/teraterm/ttpcmn/ttcmn.c
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/ttcmn.c	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpcmn/ttcmn.c	2019-10-02 15:09:00 UTC (rev 8253)
@@ -2696,6 +2696,14 @@
 }
 
 
+/*
+ * 
+ * [return]
+ *   1\x88ȏ\xE3   \x83A\x83v\x83\x8A\x82\xAA\x8Eg\x97p\x89”\\x82\xC8COM\x83|\x81[\x83g\x82̑\x8D\x90\x94
+ *   0       \x83A\x83v\x83\x8A\x82\xAA\x8Eg\x97p\x89”\\x82\xC8COM\x83|\x81[\x83g\x82\xAA\x82Ȃ\xA2
+ *   -1      \x81\xA6\x96\xA2\x8Eg\x97p
+ *
+ */
 int WINAPI DetectComPorts(LPWORD ComPortTable, int ComPortMax, char **ComPortDesc)
 {
 	HMODULE h;

Modified: branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v10.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v10.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v10.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -128,6 +128,7 @@
     <ClCompile Include="..\common\i18n.c" />
     <ClCompile Include="..\common\servicenames.c" />
     <ClCompile Include="..\common\ttlib.c" />
+    <ClCompile Include="comportinfo.cpp" />
     <ClCompile Include="language.c" />
     <ClCompile Include="ttcmn.c" />
   </ItemGroup>
@@ -137,6 +138,8 @@
     <ClInclude Include="..\common\i18n.h" />
     <ClInclude Include="..\common\servicenames.h" />
     <ClInclude Include="..\common\ttlib.h" />
+    <ClInclude Include="comportinfo.h" />
+    <ClInclude Include="devpkey_teraterm.h" />
     <ClInclude Include="language.h" />
   </ItemGroup>
   <ItemGroup>

Modified: branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v11.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v11.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v11.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -134,6 +134,7 @@
     <ClCompile Include="..\common\i18n.c" />
     <ClCompile Include="..\common\servicenames.c" />
     <ClCompile Include="..\common\ttlib.c" />
+    <ClCompile Include="comportinfo.cpp" />
     <ClCompile Include="language.c" />
     <ClCompile Include="ttcmn.c" />
   </ItemGroup>
@@ -143,6 +144,8 @@
     <ClInclude Include="..\common\i18n.h" />
     <ClInclude Include="..\common\servicenames.h" />
     <ClInclude Include="..\common\ttlib.h" />
+    <ClInclude Include="comportinfo.h" />
+    <ClInclude Include="devpkey_teraterm.h" />
     <ClInclude Include="language.h" />
   </ItemGroup>
   <ItemGroup>

Modified: branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v12.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v12.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v12.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -134,6 +134,7 @@
     <ClCompile Include="..\common\i18n.c" />
     <ClCompile Include="..\common\servicenames.c" />
     <ClCompile Include="..\common\ttlib.c" />
+    <ClCompile Include="comportinfo.cpp" />
     <ClCompile Include="language.c" />
     <ClCompile Include="ttcmn.c" />
   </ItemGroup>
@@ -143,6 +144,8 @@
     <ClInclude Include="..\common\i18n.h" />
     <ClInclude Include="..\common\servicenames.h" />
     <ClInclude Include="..\common\ttlib.h" />
+    <ClInclude Include="comportinfo.h" />
+    <ClInclude Include="devpkey_teraterm.h" />
     <ClInclude Include="language.h" />
   </ItemGroup>
   <ItemGroup>

Modified: branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v14.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v14.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v14.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -134,6 +134,7 @@
     <ClCompile Include="..\common\i18n.c" />
     <ClCompile Include="..\common\servicenames.c" />
     <ClCompile Include="..\common\ttlib.c" />
+    <ClCompile Include="comportinfo.cpp" />
     <ClCompile Include="language.c" />
     <ClCompile Include="ttcmn.c" />
   </ItemGroup>
@@ -143,6 +144,8 @@
     <ClInclude Include="..\common\i18n.h" />
     <ClInclude Include="..\common\servicenames.h" />
     <ClInclude Include="..\common\ttlib.h" />
+    <ClInclude Include="comportinfo.h" />
+    <ClInclude Include="devpkey_teraterm.h" />
     <ClInclude Include="language.h" />
   </ItemGroup>
   <ItemGroup>

Modified: branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v15.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v15.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v15.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -137,6 +137,7 @@
     <ClCompile Include="..\common\i18n.c" />
     <ClCompile Include="..\common\servicenames.c" />
     <ClCompile Include="..\common\ttlib.c" />
+    <ClCompile Include="comportinfo.cpp" />
     <ClCompile Include="language.c" />
     <ClCompile Include="ttcmn.c" />
   </ItemGroup>
@@ -146,6 +147,8 @@
     <ClInclude Include="..\common\i18n.h" />
     <ClInclude Include="..\common\servicenames.h" />
     <ClInclude Include="..\common\ttlib.h" />
+    <ClInclude Include="comportinfo.h" />
+    <ClInclude Include="devpkey_teraterm.h" />
     <ClInclude Include="language.h" />
   </ItemGroup>
   <ItemGroup>
@@ -157,4 +160,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file

Modified: branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v15.vcxproj.filters
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v15.vcxproj.filters	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v15.vcxproj.filters	2019-10-02 15:09:00 UTC (rev 8253)
@@ -37,6 +37,9 @@
     <ClCompile Include="..\common\codeconv.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="comportinfo.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\common\i18n.h">
@@ -51,6 +54,12 @@
     <ClInclude Include="..\common\ttlib.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="devpkey_teraterm.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="comportinfo.h">
+      <Filter>Source Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="ttpcmn.def">
@@ -62,4 +71,4 @@
       <Filter>Resource Files</Filter>
     </ResourceCompile>
   </ItemGroup>
-</Project>
+</Project>
\ No newline at end of file

Modified: branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v16.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v16.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v16.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -137,6 +137,7 @@
     <ClCompile Include="..\common\i18n.c" />
     <ClCompile Include="..\common\servicenames.c" />
     <ClCompile Include="..\common\ttlib.c" />
+    <ClCompile Include="comportinfo.cpp" />
     <ClCompile Include="language.c" />
     <ClCompile Include="ttcmn.c" />
   </ItemGroup>
@@ -146,6 +147,8 @@
     <ClInclude Include="..\common\i18n.h" />
     <ClInclude Include="..\common\servicenames.h" />
     <ClInclude Include="..\common\ttlib.h" />
+    <ClInclude Include="comportinfo.h" />
+    <ClInclude Include="devpkey_teraterm.h" />
     <ClInclude Include="language.h" />
   </ItemGroup>
   <ItemGroup>
@@ -157,4 +160,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file

Modified: branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v16.vcxproj.filters
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v16.vcxproj.filters	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v16.vcxproj.filters	2019-10-02 15:09:00 UTC (rev 8253)
@@ -37,6 +37,9 @@
     <ClCompile Include="..\common\codeconv.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="comportinfo.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\common\i18n.h">
@@ -51,6 +54,12 @@
     <ClInclude Include="..\common\ttlib.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="devpkey_teraterm.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="comportinfo.h">
+      <Filter>Source Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="ttpcmn.def">
@@ -62,4 +71,4 @@
       <Filter>Resource Files</Filter>
     </ResourceCompile>
   </ItemGroup>
-</Project>
+</Project>
\ No newline at end of file

Modified: branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v9.vcproj
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v9.vcproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpcmn/ttpcmn.v9.vcproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -210,6 +210,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\comportinfo.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\common\i18n.c"
 				>
 			</File>
@@ -243,6 +247,14 @@
 			Filter="h;hpp;hxx;hm;inl;fi;fd"
 			>
 			<File
+				RelativePath=".\comportinfo.h"
+				>
+			</File>
+			<File
+				RelativePath=".\devpkey_teraterm.h"
+				>
+			</File>
+			<File
 				RelativePath="..\common\i18n.h"
 				>
 			</File>

Modified: branches/unicode_buf/teraterm/ttpcmn/ttpcmn.vcproj
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/ttpcmn.vcproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpcmn/ttpcmn.vcproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -211,6 +211,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\comportinfo.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\common\i18n.c"
 				>
 			</File>
@@ -244,6 +248,14 @@
 			Filter="h;hpp;hxx;hm;inl;fi;fd"
 			>
 			<File
+				RelativePath=".\comportinfo.h"
+				>
+			</File>
+			<File
+				RelativePath=".\devpkey_teraterm.h"
+				>
+			</File>
+			<File
 				RelativePath="..\common\i18n.h"
 				>
 			</File>

Modified: branches/unicode_buf/teraterm/ttpdlg/dlg_res.h
===================================================================
--- branches/unicode_buf/teraterm/ttpdlg/dlg_res.h	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpdlg/dlg_res.h	2019-10-02 15:09:00 UTC (rev 8253)
@@ -171,6 +171,7 @@
 #define IDC_TERMRUSSFONT                1076
 #define IDC_GENLANG_UI                  1077
 #define IDC_SFMT_VERSION                1078
+#define IDC_SERIALTEXT                  1079
 #define IDC_GENHELP                     1099
 #define IDD_TERMDLG                     1100
 #define IDD_WINLISTDLG                  1200
@@ -190,7 +191,7 @@
 #define _APS_NO_MFC                     1
 #define _APS_NEXT_RESOURCE_VALUE        103
 #define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1079
+#define _APS_NEXT_CONTROL_VALUE         1080
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif

Modified: branches/unicode_buf/teraterm/ttpdlg/ttdlg.c
===================================================================
--- branches/unicode_buf/teraterm/ttpdlg/ttdlg.c	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpdlg/ttdlg.c	2019-10-02 15:09:00 UTC (rev 8253)
@@ -48,6 +48,9 @@
 #include "svnversion.h"
 #include "ttdlg.h"
 #include "../teraterm/unicode_test.h"
+#include "tipwin.h"
+#include "comportinfo.h"
+#include "codeconv.h"
 
 // Oniguruma: Regular expression library
 #define ONIG_EXTERN extern
@@ -78,6 +81,11 @@
 	TTEndDialog(p1, p2)
 
 extern HANDLE hInst;
+/*
+ * ttwinman.h\x82\xF0include\x82\xB7\x82\xE9\x82ƁAhInst\x82ƃV\x83\x93\x83{\x83\x8B\x8FՓ˂\xB7\x82邽\x82߁A
+ * cv\x82\xCCextern\x90錾\x82\xF0\x8C•ʂɒlj\xC1\x82\xB7\x82\xE9\x81B
+ */
+extern TComVar cv;
 
 static char UILanguageFile[MAX_PATH];
 
@@ -118,6 +126,11 @@
 	 "14400","19200","38400","57600","115200",
 	 "230400", "460800", "921600", NULL};
 
+/*
+ * COM\x83|\x81[\x83g\x82Ɋւ\xB7\x82\xE9\x8Fڍ׏\xEE\x95\xF1
+ */
+static ComPortInfo_t *ComPortInfoPtr;
+static int ComPortInfoCount;
 
 static INT_PTR CALLBACK TermDlg(HWND Dialog, UINT Message, WPARAM wParam, LPARAM lParam)
 {
@@ -1107,7 +1120,177 @@
 static PCHAR ParityList[] = {"none", "odd", "even", "mark", "space", NULL};
 static PCHAR StopList[] = {"1 bit", "1.5 bit", "2 bit", NULL};
 static PCHAR FlowList[] = {"Xon/Xoff", "RTS/CTS", "DSR/DTR", "none", NULL};
+static int g_deltaSumSerialDlg = 0;        // \x83}\x83E\x83X\x83z\x83C\x81[\x83\x8B\x82\xCCDelta\x97ݐϗp
+static WNDPROC g_defSerialDlgEditWndProc;  // Edit Control\x82̃T\x83u\x83N\x83\x89\x83X\x89\xBB\x97p
+static WNDPROC g_defSerialDlgSpeedComboboxWndProc;  // Combo-box Control\x82̃T\x83u\x83N\x83\x89\x83X\x89\xBB\x97p
+static TipWin *g_SerialDlgSpeedTip;
 
+/*
+ * \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x83_\x83C\x83A\x83\x8D\x83O\x82\xCCOK\x83{\x83^\x83\x93\x82\xF0\x90ڑ\xB1\x90\xE6\x82ɉ\x9E\x82\xB6\x82Ė\xBC\x8F̂\xF0\x90؂\xE8\x91ւ\xA6\x82\xE9\x81B
+ * \x8F\xF0\x8C\x8F\x94\xBB\x92\xE8\x82\xCD OnSetupSerialPort() \x82ƍ\x87\x82킹\x82\xE9\x95K\x97v\x82\xAA\x82\xA0\x82\xE9\x81B
+ */
+static void serial_dlg_change_OK_button(HWND dlg, int portno)
+{
+	static const DlgTextInfo TextInfoNewConnection[] = {
+		{ IDOK, "DLG_SERIAL_OK_CONNECTION" },
+	};
+	static const DlgTextInfo TextInfoNewOpen[] = {
+		{ IDOK, "DLG_SERIAL_OK_OPEN" },
+	};
+	static const DlgTextInfo TextInfoCloseNewOpen[] = {
+		{ IDOK, "DLG_SERIAL_OK_CLOSEOPEN" },
+	};
+	static const DlgTextInfo TextInfoResetSetting[] = {
+		{ IDOK, "DLG_SERIAL_OK_RESET" },
+	};
+	int ret = 0;
+	TCHAR uimsg[MAX_UIMSG];
+
+	if ( cv.Ready && (cv.PortType != IdSerial) ) {
+		ret = SetDlgTexts(dlg, TextInfoNewConnection, _countof(TextInfoNewConnection), UILanguageFile);
+		strncpy_s(uimsg, sizeof(uimsg), "Connect with &New window", _TRUNCATE);
+
+	} else {
+		if (cv.Open) {
+			if (portno != cv.ComPort) {
+				ret = SetDlgTexts(dlg, TextInfoCloseNewOpen, _countof(TextInfoCloseNewOpen), UILanguageFile);
+				strncpy_s(uimsg, sizeof(uimsg), "Close and &New open", _TRUNCATE);
+			} else {
+				ret = SetDlgTexts(dlg, TextInfoResetSetting, _countof(TextInfoResetSetting), UILanguageFile);
+				strncpy_s(uimsg, sizeof(uimsg), "&New setting", _TRUNCATE);
+			}
+
+		} else {
+			ret = SetDlgTexts(dlg, TextInfoNewOpen, _countof(TextInfoNewOpen), UILanguageFile);
+			strncpy_s(uimsg, sizeof(uimsg), "&New open", _TRUNCATE);
+		}
+	}
+
+	/* Default.lng \x82̏ꍇ\x81A\x8C\xBE\x8C\xEA\x83t\x83@\x83C\x83\x8B\x82\xA9\x82\xE7\x93ǂݏo\x82\xB9\x82Ȃ\xA2\x82̂ŁA
+	 * \x83f\x83t\x83H\x83\x8B\x83g\x83e\x83L\x83X\x83g\x82\xF0\x83Z\x83b\x83g\x82\xB7\x82\xE9\x81B
+	 */
+	if (ret <= 0) {
+		SetDlgItemText(dlg, IDOK, uimsg);
+	}
+}
+
+/*
+ * \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x83_\x83C\x83A\x83\x8D\x83O\x82̃e\x83L\x83X\x83g\x83{\x83b\x83N\x83X\x82\xC9COM\x83|\x81[\x83g\x82̏ڍ׏\xEE\x95\xF1\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9\x81B
+ *
+ */
+static void serial_dlg_set_comport_info(HWND dlg, int portno, char *desc)
+{
+	int i;
+	ComPortInfo_t *p;
+	char *strA;
+
+	for (i = 0 ; i < ComPortInfoCount ; i++) {
+		p = &ComPortInfoPtr[i];
+		if (p->port_no == portno)
+			break;
+	}
+	if (i >= ComPortInfoCount)  // \x8AY\x93\x96\x82\xB7\x82\xE9COM\x83|\x81[\x83g\x82\xAA\x8C\xA9\x82‚\xA9\x82\xE7\x82Ȃ\xA9\x82\xC1\x82\xBD
+		return;
+
+	strA = ToCharW(p->property);
+	SetDlgItemTextA(dlg, IDC_SERIALTEXT, strA);
+	free(strA);
+}
+
+/*
+ * \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x83_\x83C\x83A\x83\x8D\x83O\x82̃e\x83L\x83X\x83g\x83{\x83b\x83N\x83X\x82̃v\x83\x8D\x83V\x81[\x83W\x83\x83
+ */
+static LRESULT CALLBACK SerialDlgEditWindowProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) 
+{
+	WORD keys;
+	short delta;
+	BOOL page;
+
+	switch (msg) {
+		case WM_KEYDOWN:
+			// Edit control\x8F\xE3\x82\xC5 CTRL+A \x82\xF0\x89\x9F\x89\xBA\x82\xB7\x82\xE9\x82ƁA\x83e\x83L\x83X\x83g\x82\xF0\x91S\x91I\x91\xF0\x82\xB7\x82\xE9\x81B
+			if (wp == 'A' && GetKeyState(VK_CONTROL) < 0) {
+				PostMessage(hWnd, EM_SETSEL, 0, -1);
+				return 0;
+			}
+			break;
+
+		case WM_MOUSEWHEEL:
+			// CTRLorSHIFT + \x83}\x83E\x83X\x83z\x83C\x81[\x83\x8B\x82̏ꍇ\x81A\x89\xA1\x83X\x83N\x83\x8D\x81[\x83\x8B\x82\xB3\x82\xB9\x82\xE9\x81B
+			keys = GET_KEYSTATE_WPARAM(wp);
+			delta = GET_WHEEL_DELTA_WPARAM(wp);
+			page = keys & (MK_CONTROL | MK_SHIFT);
+
+			if (page == 0)
+				break;
+
+			g_deltaSumSerialDlg += delta;
+
+			if (g_deltaSumSerialDlg >= WHEEL_DELTA) {
+				g_deltaSumSerialDlg -= WHEEL_DELTA;
+				SendMessage(hWnd, WM_HSCROLL, SB_PAGELEFT , 0);
+			} else if (g_deltaSumSerialDlg <= -WHEEL_DELTA) {
+				g_deltaSumSerialDlg += WHEEL_DELTA;
+				SendMessage(hWnd, WM_HSCROLL, SB_PAGERIGHT, 0);
+			}
+
+			break;
+	}
+    return CallWindowProc(g_defSerialDlgEditWndProc, hWnd, msg, wp, lp);
+}
+
+/*
+ * \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x83_\x83C\x83A\x83\x8D\x83O\x82\xCCSPEED(BAUD)\x82̃v\x83\x8D\x83V\x81[\x83W\x83\x83
+ */
+static LRESULT CALLBACK SerialDlgSpeedComboboxWindowProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) 
+{
+	const int tooltip_timeout = 1000;  // msec
+	POINT pt;
+	int w, h;
+	int cx, cy;
+	RECT wr;
+	TCHAR str[128], uimsg[MAX_UIMSG];
+	PTTSet ts;
+
+	switch (msg) {
+		case WM_MOUSEMOVE:
+			ts = (PTTSet)GetWindowLongPtr(GetParent(hWnd) ,DWLP_USER);
+			get_lang_msg("DLG_SERIAL_SPEED_TOOLTIP", uimsg, sizeof(uimsg), "You can directly specify a number", ts->UILanguageFile);
+			_stprintf_s(str, _countof(str), _T(uimsg));
+
+			// Combo-box\x82̍\xB6\x8F\xE3\x8D\xC0\x95W\x82\xF0\x8B\x81\x82߂\xE9
+			GetWindowRect(hWnd, &wr);
+			pt.x = wr.left;
+			pt.y = wr.top;
+
+			// \x95\xB6\x8E\x9A\x97\xF1\x82̏c\x89\xA1\x83T\x83C\x83Y\x82\xF0\x8E擾\x82\xB7\x82\xE9
+			TipWinGetTextWidthHeight(hWnd, str, &w, &h);
+
+			cx = pt.x;
+			cy = pt.y - (h + FRAME_WIDTH * 6);
+
+			// \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9
+			if (g_SerialDlgSpeedTip == NULL) {
+				g_SerialDlgSpeedTip = TipWinCreate(hWnd);
+				TipWinSetHideTimer(g_SerialDlgSpeedTip, tooltip_timeout);
+			}
+			if (!TipWinIsVisible(g_SerialDlgSpeedTip))
+				TipWinSetVisible(g_SerialDlgSpeedTip, TRUE);
+
+			TipWinSetText(g_SerialDlgSpeedTip, str);
+			TipWinSetPos(g_SerialDlgSpeedTip, cx, cy);
+			TipWinSetHideTimer(g_SerialDlgSpeedTip, tooltip_timeout);
+
+			break;
+	}
+    return CallWindowProc(g_defSerialDlgSpeedComboboxWndProc, hWnd, msg, wp, lp);
+}
+
+/*
+ * \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x83_\x83C\x83A\x83\x8D\x83O
+ *
+ *
+ */
 static INT_PTR CALLBACK SerialDlg(HWND Dialog, UINT Message, WPARAM wParam, LPARAM lParam)
 {
 	static const DlgTextInfo TextInfos[] = {
@@ -1125,13 +1308,14 @@
 		{ IDCANCEL, "BTN_CANCEL" },
 		{ IDC_SERIALHELP, "BTN_HELP" },
 	};
-	PTTSet ts;
+	PTTSet ts = NULL;
 	int i, w, sel;
 	char Temp[128];
-	WORD ComPortTable[MAXCOMPORT];
-	static char *ComPortDesc[MAXCOMPORT];
-	int comports;
+	static WORD ComPortTable[MAXCOMPORT];  // \x8Eg\x97p\x89”\\x82\xC8COM\x83|\x81[\x83g\x94ԍ\x86
+	static char *ComPortDesc[MAXCOMPORT];  // COM\x83|\x81[\x83g\x82̏ڍ׏\xEE\x95\xF1
+	static int comports; // \x83e\x81[\x83u\x83\x8B\x8Dő吔
 	WORD Flow;
+	int portno;
 
 	switch (Message) {
 		case WM_INITDIALOG:
@@ -1140,6 +1324,15 @@
 
 			SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile);
 
+			EnableDlgItem(Dialog, IDC_SERIALPORT, IDC_SERIALPORT);
+			EnableDlgItem(Dialog, IDC_SERIALPORT_LABEL, IDC_SERIALPORT_LABEL);
+			EnableDlgItem(Dialog, IDOK, IDOK);
+
+			// COM\x83|\x81[\x83g\x82̏ڍ׏\xEE\x95\xF1\x82\xF0\x8E擾\x82\xB7\x82\xE9\x81B
+			// COM\x82̐ڑ\xB1\x8F󋵂͓s\x93x\x95ς\xED\x82邽\x82߁A\x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9\x93x\x82Ɏ擾\x82\xB7\x82\xE9\x81B
+			// \x95s\x97v\x82ɂȂ\xC1\x82\xBD\x82\xE7\x81AComPortInfoFree()\x82Ń\x81\x83\x82\x83\x8A\x82\xF0\x89\xF0\x95\xFA\x82\xB7\x82邱\x82ƁB
+			ComPortInfoPtr = ComPortInfoGet(&ComPortInfoCount, UILanguageFile);
+
 			w = 0;
 
 			if ((comports = DetectComPorts(ComPortTable, ts->MaxComPort, ComPortDesc)) > 0) {
@@ -1160,10 +1353,16 @@
 					if (ComPortTable[i] == ts->ComPort) {
 						w = i;
 					}
+
+					// \x8Fڍ׏\xEE\x95\xF1\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9
+					serial_dlg_set_comport_info(Dialog, ComPortTable[w], ComPortDesc[w]);
+
 				}
 			} else if (comports == 0) {
 				DisableDlgItem(Dialog, IDC_SERIALPORT, IDC_SERIALPORT);
 				DisableDlgItem(Dialog, IDC_SERIALPORT_LABEL, IDC_SERIALPORT_LABEL);
+				// COM\x83|\x81[\x83g\x82\xAA\x91\xB6\x8D݂\xB5\x82Ȃ\xA2\x8Fꍇ\x82\xCDOK\x83{\x83^\x83\x93\x82\xF0\x89\x9F\x82\xB9\x82Ȃ\xA2\x82悤\x82ɂ\xB7\x82\xE9\x81B
+				DisableDlgItem(Dialog, IDOK, IDOK);
 			} else {
 				for (i=1; i<=ts->MaxComPort; i++) {
 					_snprintf_s(Temp, sizeof(Temp), _TRUNCATE, "COM%d", i);
@@ -1219,8 +1418,32 @@
 
 			CenterWindow(Dialog, GetParent(Dialog));
 
+			// Edit control\x82\xF0\x83T\x83u\x83N\x83\x89\x83X\x89\xBB\x82\xB7\x82\xE9\x81B
+			g_deltaSumSerialDlg = 0;
+			g_defSerialDlgEditWndProc = (WNDPROC)SetWindowLongPtr(
+				GetDlgItem(Dialog, IDC_SERIALTEXT), 
+				GWLP_WNDPROC, 
+				(LONG_PTR)SerialDlgEditWindowProc);
+
+			// Combo-box control\x82\xF0\x83T\x83u\x83N\x83\x89\x83X\x89\xBB\x82\xB7\x82\xE9\x81B
+			g_defSerialDlgSpeedComboboxWndProc = (WNDPROC)SetWindowLongPtr(
+				GetDlgItem(Dialog, IDC_SERIALBAUD), 
+				GWLP_WNDPROC, 
+				(LONG_PTR)SerialDlgSpeedComboboxWindowProc);
+
+			// \x8C\xBB\x8D݂̐ڑ\xB1\x8F\xF3\x91ԂƐV\x82\xB5\x82\xA2\x83|\x81[\x83g\x94ԍ\x86\x82̑g\x82ݍ\x87\x82킹\x82ŁA\x90ڑ\xB1\x8F\x88\x97\x9D\x82\xAA\x95ς\xED\x82邽\x82߁A
+			// \x82\xBB\x82\xEA\x82ɉ\x9E\x82\xB6\x82\xC4OK\x83{\x83^\x83\x93\x82̃\x89\x83x\x83\x8B\x96\xBC\x82\xF0\x90؂\xE8\x91ւ\xA6\x82\xE9\x81B
+			serial_dlg_change_OK_button(Dialog, ComPortTable[w]);
+
 			return TRUE;
 
+		case WM_DESTROY:
+			// COM\x83|\x81[\x83g\x82̏ڍ׏\xEE\x95\xF1\x82\xF0\x89\xF0\x95\xFA\x82\xB7\x82\xE9\x81B
+			ComPortInfoFree(ComPortInfoPtr, ComPortInfoCount);
+			ComPortInfoPtr = NULL;
+			ComPortInfoCount = 0;
+			break;
+
 		case WM_COMMAND:
 			switch (LOWORD(wParam)) {
 				case IDOK:
@@ -1274,15 +1497,47 @@
 						PostMessage(GetParent(Dialog),WM_USER_CHANGETITLE,0,0);
 					}
 
+					// \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xF0\x94p\x8A\xFC\x82\xB7\x82\xE9
+					if (g_SerialDlgSpeedTip) {
+						TipWinDestroy(g_SerialDlgSpeedTip);
+						g_SerialDlgSpeedTip = NULL;
+					}
+
 					EndDialog(Dialog, 1);
 					return TRUE;
 
 				case IDCANCEL:
+					// \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xF0\x94p\x8A\xFC\x82\xB7\x82\xE9
+					if (g_SerialDlgSpeedTip) {
+						TipWinDestroy(g_SerialDlgSpeedTip);
+						g_SerialDlgSpeedTip = NULL;
+					}
+
 					EndDialog(Dialog, 0);
 					return TRUE;
 
 				case IDC_SERIALHELP:
 					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,0,0);
+					return TRUE;
+
+				case IDC_SERIALPORT:
+					switch (HIWORD(wParam)) {
+					case CBN_SELCHANGE: // \x83\x8A\x83X\x83g\x82\xA9\x82\xE7COM\x83|\x81[\x83g\x82\xAA\x91I\x91\xF0\x82\xB3\x82ꂽ
+						sel = SendDlgItemMessage(Dialog, IDC_SERIALPORT, CB_GETCURSEL, 0, 0);
+						portno = ComPortTable[sel];  // \x90V\x82\xB5\x82\xA2\x83|\x81[\x83g\x94ԍ\x86
+
+						// \x8Fڍ׏\xEE\x95\xF1\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9
+						serial_dlg_set_comport_info(Dialog, ComPortTable[sel], ComPortDesc[sel]);
+
+						// \x8C\xBB\x8D݂̐ڑ\xB1\x8F\xF3\x91ԂƐV\x82\xB5\x82\xA2\x83|\x81[\x83g\x94ԍ\x86\x82̑g\x82ݍ\x87\x82킹\x82ŁA\x90ڑ\xB1\x8F\x88\x97\x9D\x82\xAA\x95ς\xED\x82邽\x82߁A
+						// \x82\xBB\x82\xEA\x82ɉ\x9E\x82\xB6\x82\xC4OK\x83{\x83^\x83\x93\x82̃\x89\x83x\x83\x8B\x96\xBC\x82\xF0\x90؂\xE8\x91ւ\xA6\x82\xE9\x81B
+						serial_dlg_change_OK_button(Dialog, portno);
+
+						break;
+
+					}
+				
+					return TRUE;
 			}
 	}
 	return FALSE;

Modified: branches/unicode_buf/teraterm/ttpdlg/ttpdlg.rc
===================================================================
--- branches/unicode_buf/teraterm/ttpdlg/ttpdlg.rc	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpdlg/ttpdlg.rc	2019-10-02 15:09:00 UTC (rev 8253)
@@ -125,9 +125,9 @@
     EDITTEXT        IDC_LOCALE_EDIT,59,140,63,13,ES_AUTOHSCROLL
 END
 
-IDD_SERIALDLG DIALOGEX 20, 20, 190, 143
+IDD_SERIALDLG DIALOGEX 20, 20, 234, 214
 STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Tera Term: Serial port setup"
+CAPTION "Tera Term: Serial port setup and connection"
 FONT 14, "System", 0, 0, 0x0
 BEGIN
     CONTROL         "&Port:",IDC_SERIALPORT_LABEL,"Static",SS_LEFTNOWORDWRAP,15,9,54,8
@@ -142,14 +142,15 @@
     COMBOBOX        IDC_SERIALSTOP,75,67,48,40,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
     CONTROL         "&Flow control:",IDC_SERIALFLOW_LABEL,"Static",SS_LEFTNOWORDWRAP,15,84,54,8
     COMBOBOX        IDC_SERIALFLOW,75,82,48,53,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
-    GROUPBOX        "Transmit delay",IDC_SERIALDELAY,19,104,152,32
-    LTEXT           "msec/&char",IDC_SERIALDELAYCHAR_LABEL,53,118,42,10
-    EDITTEXT        IDC_SERIALDELAYCHAR,29,116,20,12,ES_AUTOHSCROLL | ES_NUMBER
-    LTEXT           "msec/&line",IDC_SERIALDELAYLINE_LABEL,124,118,42,10
-    EDITTEXT        IDC_SERIALDELAYLINE,100,116,20,12,ES_AUTOHSCROLL | ES_NUMBER
-    DEFPUSHBUTTON   "OK",IDOK,138,9,40,16,WS_GROUP
-    PUSHBUTTON      "Cancel",IDCANCEL,138,34,40,16
-    PUSHBUTTON      "&Help",IDC_SERIALHELP,138,62,40,16
+    GROUPBOX        "Transmit delay",IDC_SERIALDELAY,41,104,152,32
+    LTEXT           "msec/&char",IDC_SERIALDELAYCHAR_LABEL,75,118,42,10
+    EDITTEXT        IDC_SERIALDELAYCHAR,51,116,20,12,ES_AUTOHSCROLL | ES_NUMBER
+    LTEXT           "msec/&line",IDC_SERIALDELAYLINE_LABEL,146,118,42,10
+    EDITTEXT        IDC_SERIALDELAYLINE,122,116,20,12,ES_AUTOHSCROLL | ES_NUMBER
+    DEFPUSHBUTTON   "OK",IDOK,138,9,87,18,BS_CENTER | BS_MULTILINE | WS_GROUP
+    PUSHBUTTON      "Cancel",IDCANCEL,138,38,87,16,BS_CENTER
+    PUSHBUTTON      "&Help",IDC_SERIALHELP,138,64,86,16,BS_CENTER
+    EDITTEXT        IDC_SERIALTEXT,10,141,212,70,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | WS_HSCROLL
 END
 
 IDD_TCPIPDLG DIALOGEX 20, 20, 222, 157
@@ -402,6 +403,11 @@
 #ifdef APSTUDIO_INVOKED
 GUIDELINES DESIGNINFO 
 BEGIN
+    IDD_SERIALDLG, DIALOG
+    BEGIN
+        RIGHTMARGIN, 232
+    END
+
     IDD_HOSTDLG, DIALOG
     BEGIN
         LEFTMARGIN, 4

Modified: branches/unicode_buf/teraterm/ttpmacro/CMakeLists.txt
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/CMakeLists.txt	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpmacro/CMakeLists.txt	2019-10-02 15:09:00 UTC (rev 8253)
@@ -15,7 +15,6 @@
   ../common/ttddecmnd.h
   ../common/tttypes.h
   ../common/tt-version.h
-  ../common/i18n.c
   ../common/i18n.h
   ../common/ttlib.c
   ../common/ttlib.h

Modified: branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v10.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v10.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v10.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -130,7 +130,6 @@
     <ClCompile Include="..\common\dlglib_cpp.cpp" />
     <ClCompile Include="..\common\dlglib_tmpl.cpp" />
     <ClCompile Include="..\common\dllutil.cpp" />
-    <ClCompile Include="..\common\i18n.c" />
     <ClCompile Include="..\common\tmfc.cpp" />
     <ClCompile Include="..\common\tmfc_frame.cpp" />
     <ClCompile Include="..\common\ttlib.c" />

Modified: branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v11.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v11.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v11.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -130,7 +130,6 @@
     <ClCompile Include="..\common\dlglib_cpp.cpp" />
     <ClCompile Include="..\common\dlglib_tmpl.cpp" />
     <ClCompile Include="..\common\dllutil.cpp" />
-    <ClCompile Include="..\common\i18n.c" />
     <ClCompile Include="..\common\tmfc.cpp" />
     <ClCompile Include="..\common\tmfc_frame.cpp" />
     <ClCompile Include="..\common\ttlib.c" />

Modified: branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v12.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v12.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v12.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -130,7 +130,6 @@
     <ClCompile Include="..\common\dlglib_cpp.cpp" />
     <ClCompile Include="..\common\dlglib_tmpl.cpp" />
     <ClCompile Include="..\common\dllutil.cpp" />
-    <ClCompile Include="..\common\i18n.c" />
     <ClCompile Include="..\common\tmfc.cpp" />
     <ClCompile Include="..\common\tmfc_frame.cpp" />
     <ClCompile Include="..\common\ttlib.c" />

Modified: branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v14.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v14.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v14.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -130,7 +130,6 @@
     <ClCompile Include="..\common\dlglib_cpp.cpp" />
     <ClCompile Include="..\common\dlglib_tmpl.cpp" />
     <ClCompile Include="..\common\dllutil.cpp" />
-    <ClCompile Include="..\common\i18n.c" />
     <ClCompile Include="..\common\tmfc.cpp" />
     <ClCompile Include="..\common\tmfc_frame.cpp" />
     <ClCompile Include="..\common\ttlib.c" />

Modified: branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v15.vcxproj
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v15.vcxproj	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpmacro/ttpmacro.v15.vcxproj	2019-10-02 15:09:00 UTC (rev 8253)
@@ -133,7 +133,6 @@
     <ClCompile Include="..\common\dlglib_cpp.cpp" />
     <ClCompile Include="..\common\dlglib_tmpl.cpp" />
     <ClCompile Include="..\common\dllutil.cpp" />
-    <ClCompile Include="..\common\i18n.c" />
     <ClCompile Include="..\common\tmfc.cpp" />
     <ClCompile Include="..\common\tmfc_frame.cpp" />
     <ClCompile Include="..\common\ttlib.c" />
@@ -207,4 +206,4 @@
       <UserProperties RESOURCE_FILE="ttpmacro.rc" />
     </VisualStudio>
   </ProjectExtensions>
-</Project>
\ No newline at end of file
+</Project>

Modified: branches/unicode_buf/teraterm/ttpset/ttpset.def
===================================================================
--- branches/unicode_buf/teraterm/ttpset/ttpset.def	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpset/ttpset.def	2019-10-02 15:09:00 UTC (rev 8253)
@@ -7,3 +7,4 @@
   ParseParam @6
   CopySerialList @7
   AddValueToList @8
+  SerialPortConfconvertId2Str @9

Modified: branches/unicode_buf/teraterm/ttpset/ttset.c
===================================================================
--- branches/unicode_buf/teraterm/ttpset/ttset.c	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/teraterm/ttpset/ttset.c	2019-10-02 15:09:00 UTC (rev 8253)
@@ -60,6 +60,148 @@
 	{ "Windows", "KOI8-R", "CP-866", "ISO-8859-5", NULL };
 static PCHAR far RussList2[] = { "Windows", "KOI8-R", NULL };
 
+
+/*
+ * \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x8A֘A\x82̐ݒ\xE8\x92\xE8\x8B`
+ */
+#define IDENDMARK 0xFFFF
+
+typedef struct id_str_pair {
+	WORD id;
+	char *str;
+} id_str_pair_t;
+
+static id_str_pair_t serial_conf_databit[] = {
+	{IdDataBit7, "7"},
+	{IdDataBit8, "8"},
+	{IDENDMARK, NULL},
+};
+
+static id_str_pair_t serial_conf_parity[] = {
+	{IdParityNone, "none"},
+	{IdParityOdd, "odd"},
+	{IdParityEven, "even"},
+	{IdParityMark, "mark"},
+	{IdParitySpace, "space"},
+	{IDENDMARK, NULL},
+};
+
+static id_str_pair_t serial_conf_stopbit[] = {
+	{IdStopBit1, "1"},
+	{IdStopBit15, "1.5"},
+	{IdStopBit2, "2"},
+	{IDENDMARK, NULL},
+};
+
+static id_str_pair_t serial_conf_flowctrl[] = {
+	{IdFlowX, "x"},
+	{IdFlowHard, "hard"},
+	{IdFlowHard, "rtscts"},
+	{IdFlowNone, "none"},
+	{IdFlowHardDsrDtr, "dsrdtr"},
+	{IDENDMARK, NULL},
+};
+
+
+/*
+ * \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x8A֘A\x82̐ݒ\xE8
+ * Id\x82\xA9\x82當\x8E\x9A\x97\xF1\x82ɕϊ\xB7\x82\xB7\x82\xE9\x81B
+ *
+ * return
+ *    TRUE: \x95ϊ\xB7\x90\xAC\x8C\xF7
+ *    FALSE: \x95ϊ\xB7\x8E\xB8\x94s
+ */
+int PASCAL SerialPortConfconvertId2Str(enum serial_port_conf type, WORD id, PCHAR str, int strlen)
+{
+	id_str_pair_t *conf;
+	int ret = FALSE;
+	int i;
+
+	switch (type) {
+		case COM_DATABIT:
+			conf = serial_conf_databit;
+			break;
+		case COM_PARITY:
+			conf = serial_conf_parity;
+			break;
+		case COM_STOPBIT:
+			conf = serial_conf_stopbit;
+			break;
+		case COM_FLOWCTRL:
+			conf = serial_conf_flowctrl;
+			break;
+		default:
+			conf = NULL;
+			break;
+	}
+	if (conf == NULL)
+		goto error;
+
+	for (i = 0 ;  ; i++) {
+		if (conf[i].id == IDENDMARK)
+			goto error;
+		if (conf[i].id == id) {
+			strncpy_s(str, strlen, conf[i].str, _TRUNCATE);
+			break;
+		}
+	}
+
+	ret = TRUE;
+
+error:
+	return (ret);
+}
+
+/*
+ * \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x8A֘A\x82̐ݒ\xE8
+ * \x95\xB6\x8E\x9A\x97񂩂\xE7Id\x82ɕϊ\xB7\x82\xB7\x82\xE9\x81B
+ *
+ * return
+ *    TRUE: \x95ϊ\xB7\x90\xAC\x8C\xF7
+ *    FALSE: \x95ϊ\xB7\x8E\xB8\x94s
+ */
+static int SerialPortConfconvertStr2Id(enum serial_port_conf type, PCHAR str, WORD *id)
+{
+	id_str_pair_t *conf;
+	int ret = FALSE;
+	int i;
+
+	switch (type) {
+		case COM_DATABIT:
+			conf = serial_conf_databit;
+			break;
+		case COM_PARITY:
+			conf = serial_conf_parity;
+			break;
+		case COM_STOPBIT:
+			conf = serial_conf_stopbit;
+			break;
+		case COM_FLOWCTRL:
+			conf = serial_conf_flowctrl;
+			break;
+		default:
+			conf = NULL;
+			break;
+	}
+	if (conf == NULL)
+		goto error;
+
+	for (i = 0 ;  ; i++) {
+		if (conf[i].id == IDENDMARK)
+			goto error;
+		if (_stricmp(conf[i].str, str) == 0) {
+			*id = conf[i].id;
+			break;
+		}
+	}
+
+	ret = TRUE;
+
+error:
+	return (ret);
+}
+
+
 WORD str2id(PCHAR far * List, PCHAR str, WORD DefId)
 {
 	WORD i;
@@ -1034,48 +1176,30 @@
 	/* Parity */
 	GetPrivateProfileString(Section, "Parity", "",
 	                        Temp, sizeof(Temp), FName);
-	if (_stricmp(Temp, "even") == 0)
-		ts->Parity = IdParityEven;
-	else if (_stricmp(Temp, "odd") == 0)
-		ts->Parity = IdParityOdd;
-	else if (_stricmp(Temp, "mark") == 0)
-		ts->Parity = IdParityMark;
-	else if (_stricmp(Temp, "space") == 0)
-		ts->Parity = IdParitySpace;
-	else
+	if (!SerialPortConfconvertStr2Id(COM_PARITY, Temp, &ts->Parity)) {
 		ts->Parity = IdParityNone;
+	}
 
 	/* Data bit */
 	GetPrivateProfileString(Section, "DataBit", "",
 	                        Temp, sizeof(Temp), FName);
-	if (_stricmp(Temp, "7") == 0)
-		ts->DataBit = IdDataBit7;
-	else
+	if (!SerialPortConfconvertStr2Id(COM_DATABIT, Temp, &ts->DataBit)) {
 		ts->DataBit = IdDataBit8;
+	}
 
 	/* Stop bit */
 	GetPrivateProfileString(Section, "StopBit", "",
 	                        Temp, sizeof(Temp), FName);
-	if (_stricmp(Temp, "2") == 0)
-		ts->StopBit = IdStopBit2;
-	else if (_stricmp(Temp, "1.5") == 0)
-		ts->StopBit = IdStopBit15;
-	else
+	if (!SerialPortConfconvertStr2Id(COM_STOPBIT, Temp, &ts->StopBit)) {
 		ts->StopBit = IdStopBit1;
+	}
 
 	/* Flow control */
 	GetPrivateProfileString(Section, "FlowCtrl", "",
 	                        Temp, sizeof(Temp), FName);
-	if (_stricmp(Temp, "x") == 0)
-		ts->Flow = IdFlowX;
-	else if (_stricmp(Temp, "hard") == 0)
-		ts->Flow = IdFlowHard;
-	else if (_stricmp(Temp, "rtscts") == 0)  // hard\x82\xC6rtscts\x82͓\xAF\x82\xB6\x88Ӗ\xA1
-		ts->Flow = IdFlowHard;
-	else if (_stricmp(Temp, "dsrdtr") == 0)
-		ts->Flow = IdFlowHardDsrDtr;
-	else
+	if (!SerialPortConfconvertStr2Id(COM_FLOWCTRL, Temp, &ts->Flow)) {
 		ts->Flow = IdFlowNone;
+	}
 
 	/* Delay per character */
 	ts->DelayPerChar =
@@ -2593,59 +2717,25 @@
 	WritePrivateProfileString(Section, "BaudRate", Temp, FName);
 
 	/* Parity */
-	switch (ts->Parity) {
-	case IdParityEven:
-		strncpy_s(Temp, sizeof(Temp), "even", _TRUNCATE);
-		break;
-	case IdParityOdd:
-		strncpy_s(Temp, sizeof(Temp), "odd", _TRUNCATE);
-		break;
-	case IdParityMark:
-		strncpy_s(Temp, sizeof(Temp), "mark", _TRUNCATE);
-		break;
-	case IdParitySpace:
-		strncpy_s(Temp, sizeof(Temp), "space", _TRUNCATE);
-		break;
-	default:
+	if (!SerialPortConfconvertId2Str(COM_PARITY, ts->Parity, Temp, sizeof(Temp))) {
 		strncpy_s(Temp, sizeof(Temp), "none", _TRUNCATE);
 	}
 	WritePrivateProfileString(Section, "Parity", Temp, FName);
 
 	/* Data bit */
-	if (ts->DataBit == IdDataBit7)
-		strncpy_s(Temp, sizeof(Temp), "7", _TRUNCATE);
-	else
+	if (!SerialPortConfconvertId2Str(COM_DATABIT, ts->DataBit, Temp, sizeof(Temp))) {
 		strncpy_s(Temp, sizeof(Temp), "8", _TRUNCATE);
-
+	}
 	WritePrivateProfileString(Section, "DataBit", Temp, FName);
 
 	/* Stop bit */
-	switch (ts->StopBit) {
-	case IdStopBit2:
-		strncpy_s(Temp, sizeof(Temp), "2", _TRUNCATE);
-		break;
-	case IdStopBit15:
-		strncpy_s(Temp, sizeof(Temp), "1.5", _TRUNCATE);
-		break;
-	default:
+	if (!SerialPortConfconvertId2Str(COM_STOPBIT, ts->StopBit, Temp, sizeof(Temp))) {
 		strncpy_s(Temp, sizeof(Temp), "1", _TRUNCATE);
-		break;
 	}
-
 	WritePrivateProfileString(Section, "StopBit", Temp, FName);
 
 	/* Flow control */
-	switch (ts->Flow) {
-	case IdFlowX:
-		strncpy_s(Temp, sizeof(Temp), "x", _TRUNCATE);
-		break;
-	case IdFlowHard:
-		strncpy_s(Temp, sizeof(Temp), "hard", _TRUNCATE);
-		break;
-	case IdFlowHardDsrDtr:
-		strncpy_s(Temp, sizeof(Temp), "dsrdtr", _TRUNCATE);
-		break;
-	default:
+	if (!SerialPortConfconvertId2Str(COM_FLOWCTRL, ts->Flow, Temp, sizeof(Temp))) {
 		strncpy_s(Temp, sizeof(Temp), "none", _TRUNCATE);
 	}
 	WritePrivateProfileString(Section, "FlowCtrl", Temp, FName);
@@ -4047,6 +4137,36 @@
 			if ((ParamCom < 1) || (ParamCom > ts->MaxComPort))
 				ParamCom = 0;
 		}
+		else if (_strnicmp(Temp, "/CDATABIT=", 10) == 0) {	/* COM data bit */
+			ParamPort = IdSerial;
+			SerialPortConfconvertStr2Id(COM_DATABIT, &Temp[10], &ts->DataBit);
+		}
+		else if (_strnicmp(Temp, "/CPARITY=", 9) == 0) {	/* COM Parity */
+			ParamPort = IdSerial;
+			SerialPortConfconvertStr2Id(COM_PARITY, &Temp[9], &ts->Parity);
+		}
+		else if (_strnicmp(Temp, "/CSTOPBIT=", 10) == 0) {	/* COM Stop bit */
+			ParamPort = IdSerial;
+			SerialPortConfconvertStr2Id(COM_STOPBIT, &Temp[10], &ts->StopBit);
+		}
+		else if (_strnicmp(Temp, "/CFLOWCTRL=", 11) == 0) {	/* COM Flow control */
+			ParamPort = IdSerial;
+			SerialPortConfconvertStr2Id(COM_FLOWCTRL, &Temp[11], &ts->Flow);
+		}
+		else if (_strnicmp(Temp, "/CDELAYPERCHAR=", 15) == 0) {	/* COM Transmit delay per character (in msec) */
+			WORD val = 0;
+
+			ParamPort = IdSerial;
+			val = atoi(&Temp[15]);
+			ts->DelayPerChar = val;
+		}
+		else if (_strnicmp(Temp, "/CDELAYPERLINE=", 15) == 0) {	/* COM Transmit delay per line (in msec) */
+			WORD val = 0;
+
+			ParamPort = IdSerial;
+			val = atoi(&Temp[15]);
+			ts->DelayPerLine = val;
+		}
 		else if (_stricmp(Temp, "/WAITCOM") == 0) {	/* wait COM arrival */
 			ts->WaitCom = 1;
 		}

Added: branches/unicode_buf/tests/#39614-portforward.rb
===================================================================
--- branches/unicode_buf/tests/#39614-portforward.rb	                        (rev 0)
+++ branches/unicode_buf/tests/#39614-portforward.rb	2019-10-02 15:09:00 UTC (rev 8253)
@@ -0,0 +1,49 @@
+#!/usr/bin/ruby
+# coding: UTF-8
+#
+# Ticket: #39614 のテストスクリプト
+#
+# Tera Term で /ssh-L8000:ttssh2.osdn.jp:80 を指定してサーバに接続後、
+# このスクリプトを実行する。
+# 再現しない場合は sleep の時間を適宜調整する
+#
+
+require 'socket'
+
+s = TCPSocket.open("localhost", 8000)
+
+puts "Send request."
+s.write "GET /tmp/ticket-39614-test.txt HTTP/1.0\r\nHost: ttssh2.osdn.jp\r\n\r\n"
+
+puts "Wait 5 seconds."
+sleep 5
+
+puts "Skip HTTP header"
+
+while s.gets
+  break if /^\r\n$/ =~ $_
+end
+
+count = 0
+
+puts "Reading body part..."
+while data = s.read(4096)
+  count += data.size
+  if ((count / 4096) % 64) == 0
+    puts "#{count} bytes read"
+    sleep 1
+  end
+end
+
+s.close
+
+result = ""
+if count == 13229000
+  result = "data OK."
+elsif count < 13229000
+  result = "data corrupted."
+else
+  result = "unknown data."
+end
+
+puts "END: #{count} bytes read. #{result}"


Property changes on: branches/unicode_buf/tests/#39614-portforward.rb
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: branches/unicode_buf/ttssh2/ttxssh/CMakeLists.txt
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/CMakeLists.txt	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/ttssh2/ttxssh/CMakeLists.txt	2019-10-02 15:09:00 UTC (rev 8253)
@@ -6,7 +6,7 @@
 include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/lib_openssl.cmake)
 
 if (MSVC)
-  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DELAYLOAD:dnsapi.dll")
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DELAYLOAD:user32.dll /DELAYLOAD:dnsapi.dll")
 endif()
 
 add_library(

Modified: branches/unicode_buf/ttssh2/ttxssh/auth.c
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/auth.c	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/ttssh2/ttxssh/auth.c	2019-10-02 15:09:00 UTC (rev 8253)
@@ -122,7 +122,9 @@
 					_tcscat_s(uimsg, _countof(uimsg), pvar->ts->UIMsg);
 				}
 				GetWindowRect(control, &rect);
-				data->tipwin = TipWinCreate(control, rect.left, rect.bottom, uimsg);
+				data->tipwin = TipWinCreate(control);
+				TipWinSetPos(data->tipwin, rect.left, rect.bottom);
+				TipWinSetText(data->tipwin, uimsg);
 			}
 
 			return 0;
@@ -243,34 +245,6 @@
 	}
 }
 
-static LRESULT CALLBACK username_proc(HWND hWnd, UINT msg,
-									  WPARAM wParam, LPARAM lParam)
-{
-	const WNDPROC ProcOrg = (WNDPROC)GetWindowLongPtr(hWnd, GWLP_USERDATA);
-	const LRESULT result = CallWindowProc(ProcOrg, hWnd, msg, wParam, lParam);
-	switch (msg) {
-	case WM_CHAR:
-	case WM_SETTEXT: {
-		// \x83\x86\x81[\x83U\x81[\x96\xBC\x82\xAA\x93\xFC\x97͂\xB3\x82\xEA\x82Ă\xA2\x82\xBD\x8Fꍇ\x81A\x83I\x83v\x83V\x83\x87\x83\x93\x82\xF0\x8Eg\x82\xA4\x82\xB1\x82Ƃ͂Ȃ\xA2\x82̂ŁA
-		// tab\x82ł̃t\x83H\x81[\x83J\x83X\x88ړ\xAE\x8E\x9E\x81A\x83I\x83v\x83V\x83\x87\x83\x93\x83{\x83^\x83\x93\x82\xF0\x83p\x83X\x82\xB7\x82\xE9\x82悤\x82ɂ\xB7\x82\xE9
-		// \x8F]\x97\x88\x82Ɠ\xAF\x82\xB6\x83L\x81[\x91\x80\x8D\xEC\x82Ń\x86\x81[\x83U\x81[\x96\xBC\x82ƃp\x83X\x83t\x83\x8C\x81[\x83Y\x82\xF0\x93\xFC\x97͉”\\x82Ƃ\xB7\x82\xE9
-		const HWND dlg = GetParent(hWnd);
-		const HWND hWndOption = GetDlgItem(dlg, IDC_USERNAME_OPTION);
-		const int len = GetWindowTextLength(hWnd);
-		LONG_PTR style = GetWindowLongPtr(hWndOption, GWL_STYLE);
-		if (len > 0) {
-			// \x95s\x97vtabstop
-			style = style & (~(LONG_PTR)WS_TABSTOP);
-		} else {
-			// \x97vtabstop
-			style = style | WS_TABSTOP;
-		}
-		SetWindowLongPtr(hWndOption, GWL_STYLE, style);
-	}
-	}
-	return result;
-}
-
 static void init_auth_dlg(PTInstVar pvar, HWND dlg, BOOL *UseControlChar)
 {
 	const static DlgTextInfo text_info[] = {
@@ -330,14 +304,6 @@
 		SetDlgItemText(dlg, IDC_SSHUSETIS, pvar->ts->UIMsg);
 	}
 
-	// username\x82̃T\x83u\x83N\x83\x89\x83X\x89\xBB
-	{
-		HWND hWndUserName = GetDlgItem(dlg, IDC_SSHUSERNAME);
-		LONG_PTR ProcOrg =
-			SetWindowLongPtr(hWndUserName, GWLP_WNDPROC, (LONG_PTR)username_proc);
-		SetWindowLongPtr(hWndUserName, GWLP_USERDATA, ProcOrg);
-	}
-
 	if (pvar->auth_state.user != NULL) {
 		SetDlgItemText(dlg, IDC_SSHUSERNAME, pvar->auth_state.user);
 		EnableWindow(GetDlgItem(dlg, IDC_SSHUSERNAME), FALSE);
@@ -816,7 +782,6 @@
 }
 
 
-BOOL autologin_sent_none;
 static INT_PTR CALLBACK auth_dlg_proc(HWND dlg, UINT msg, WPARAM wParam,
 									  LPARAM lParam)
 {
@@ -825,9 +790,11 @@
 	const int IDC_TIMER3 = 302; // challenge \x82\xC5 ask4passwd \x82\xC5CheckAuthListFirst \x82\xAA FALSE \x82̂Ƃ\xAB
 	const int autologin_timeout = 10; // \x83~\x83\x8A\x95b
 	PTInstVar pvar;
+	static BOOL autologin_sent_none;
 	static BOOL UseControlChar;
 	static BOOL ShowPassPhrase;
 	static HICON hIconDropdown;
+	static size_t username_str_len;
 	TCHAR uimsg[MAX_UIMSG];
 
 	switch (msg) {
@@ -838,6 +805,7 @@
 
 		UseControlChar = TRUE;
 		ShowPassPhrase = FALSE;
+		username_str_len = 0;
 		init_auth_dlg(pvar, dlg, &UseControlChar);
 
 		// "\x81\xA5"\x89摜\x82\xF0\x83Z\x83b\x83g\x82\xB7\x82\xE9
@@ -1002,35 +970,63 @@
 			return TRUE;
 
 		case IDC_SSHUSERNAME:
-			// \x83\x86\x81[\x83U\x96\xBC\x82\xAA\x83t\x83H\x81[\x83J\x83X\x82\xF0\x8E\xB8\x82\xC1\x82\xBD\x82Ƃ\xAB (2007.9.29 maya)
-			if (!(pvar->ssh_state.status_flags & STATUS_DONT_SEND_USER_NAME) &&
-			    (pvar->ssh_state.status_flags & STATUS_HOST_OK) &&
-			    HIWORD(wParam) == EN_KILLFOCUS) {
-				// \x90ݒ肪\x97L\x8C\xF8\x82ł܂\xBE\x8E\xE6\x82\xE8\x82ɍs\x82\xC1\x82Ă\xA2\x82Ȃ\xA2\x82Ȃ\xE7
-				if (SSHv2(pvar) &&
-					pvar->session_settings.CheckAuthListFirst &&
-					!pvar->tryed_ssh2_authlist) {
-					// \x83_\x83C\x83A\x83\x8D\x83O\x82̃\x86\x81[\x83U\x96\xBC\x82𔽉f
-					if (pvar->auth_state.user == NULL) {
-						pvar->auth_state.user =
-							alloc_control_text(GetDlgItem(dlg, IDC_SSHUSERNAME));
-					}
+			switch (HIWORD(wParam)) {
+			case EN_KILLFOCUS: {
+				// \x83\x86\x81[\x83U\x96\xBC\x82\xAA\x83t\x83H\x81[\x83J\x83X\x82\xF0\x8E\xB8\x82\xC1\x82\xBD\x82Ƃ\xAB (2007.9.29 maya)
+				if (!(pvar->ssh_state.status_flags & STATUS_DONT_SEND_USER_NAME) &&
+					(pvar->ssh_state.status_flags & STATUS_HOST_OK)) {
+					// \x90ݒ肪\x97L\x8C\xF8\x82ł܂\xBE\x8E\xE6\x82\xE8\x82ɍs\x82\xC1\x82Ă\xA2\x82Ȃ\xA2\x82Ȃ\xE7
+					if (SSHv2(pvar) &&
+						pvar->session_settings.CheckAuthListFirst &&
+						!pvar->tryed_ssh2_authlist) {
+						// \x83_\x83C\x83A\x83\x8D\x83O\x82̃\x86\x81[\x83U\x96\xBC\x82𔽉f
+						if (pvar->auth_state.user == NULL) {
+							pvar->auth_state.user =
+								alloc_control_text(GetDlgItem(dlg, IDC_SSHUSERNAME));
+						}
 
-					// \x83\x86\x81[\x83U\x96\xBC\x82\xAA\x93\xFC\x97͂\xB3\x82\xEA\x82Ă\xA2\x82邩\x83`\x83F\x83b\x83N\x82\xB7\x82\xE9
-					if (strlen(pvar->auth_state.user) == 0) {
-						return FALSE;
-					}
+						// \x83\x86\x81[\x83U\x96\xBC\x82\xAA\x93\xFC\x97͂\xB3\x82\xEA\x82Ă\xA2\x82邩\x83`\x83F\x83b\x83N\x82\xB7\x82\xE9
+						if (strlen(pvar->auth_state.user) == 0) {
+							return FALSE;
+						}
 
-					// \x83\x86\x81[\x83U\x96\xBC\x82\xF0\x95ύX\x82\xB3\x82\xB9\x82Ȃ\xA2
-					EnableWindow(GetDlgItem(dlg, IDC_SSHUSERNAME), FALSE);
-					EnableWindow(GetDlgItem(dlg, IDC_USERNAME_OPTION), FALSE);
+						// \x83\x86\x81[\x83U\x96\xBC\x82\xF0\x95ύX\x82\xB3\x82\xB9\x82Ȃ\xA2
+						EnableWindow(GetDlgItem(dlg, IDC_SSHUSERNAME), FALSE);
+						EnableWindow(GetDlgItem(dlg, IDC_USERNAME_OPTION), FALSE);
 
-					// \x94F\x8F؃\x81\x83\\x83b\x83h none \x82𑗂\xE9
-					do_SSH2_userauth(pvar);
-					return TRUE;
+						// \x94F\x8F؃\x81\x83\\x83b\x83h none \x82𑗂\xE9
+						do_SSH2_userauth(pvar);
+						return TRUE;
+					}
 				}
+				return FALSE;
 			}
+			case EN_CHANGE: {
+				// \x83\x86\x81[\x83U\x81[\x96\xBC\x82\xAA\x93\xFC\x97͂\xB3\x82\xEA\x82Ă\xA2\x82\xBD\x8Fꍇ\x81A\x83I\x83v\x83V\x83\x87\x83\x93\x82\xF0\x8Eg\x82\xA4\x82\xB1\x82Ƃ͂Ȃ\xA2\x82̂ŁA
+				// tab\x82ł̃t\x83H\x81[\x83J\x83X\x88ړ\xAE\x8E\x9E\x81A\x83I\x83v\x83V\x83\x87\x83\x93\x83{\x83^\x83\x93\x82\xF0\x83p\x83X\x82\xB7\x82\xE9\x82悤\x82ɂ\xB7\x82\xE9
+				// \x8F]\x97\x88\x82Ɠ\xAF\x82\xB6\x83L\x81[\x91\x80\x8D\xEC\x82Ń\x86\x81[\x83U\x81[\x96\xBC\x82ƃp\x83X\x83t\x83\x8C\x81[\x83Y\x82\xF0\x93\xFC\x97͉”\\x82Ƃ\xB7\x82\xE9
+				HWND hWnd = (HWND)lParam;
+				const int len = GetWindowTextLength(hWnd);
+				if ((username_str_len == 0 && len != 0) ||
+					(username_str_len != 0 && len == 0)) {
+					// \x83\x86\x81[\x83U\x81[\x96\xBC\x82̕\xB6\x8E\x9A\x92\xB7\x82\xAA 0\x82ɂȂ\xE9 or 0\x82ł͂Ȃ\xAD\x82Ȃ\xE9 \x8E\x9E\x82̂ݏ\x88\x97\x9D
+					const HWND hWndOption = GetDlgItem(dlg, IDC_USERNAME_OPTION);
+					LONG_PTR style = GetWindowLongPtr(hWndOption, GWL_STYLE);
 
+					if (len > 0) {
+						// \x95s\x97vtabstop
+						style = style & (~(LONG_PTR)WS_TABSTOP);
+					}
+					else {
+						// \x97vtabstop
+						style = style | WS_TABSTOP;
+					}
+					SetWindowLongPtr(hWndOption, GWL_STYLE, style);
+				}
+				username_str_len = len;
+				return FALSE;
+			}
+			}
 			return FALSE;
 
 		case IDC_SSHUSEPASSWORD:
@@ -1349,21 +1345,14 @@
 
 static void init_TIS_dlg(PTInstVar pvar, HWND dlg)
 {
-	char uimsg[MAX_UIMSG];
+	const static DlgTextInfo text_info[] = {
+		{ 0, "DLG_TIS_TITLE" },
+		{ IDC_SSHAUTHBANNER, "DLG_TIS_BANNER" },
+		{ IDOK, "BTN_OK" },
+		{ IDCANCEL, "BTN_DISCONNECT" },
+	};
+	SetI18DlgStrs("TTSSH", dlg, text_info, _countof(text_info), pvar->ts->UILanguageFile);
 
-	GetWindowText(dlg, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_TIS_TITLE", pvar, uimsg);
-	SetWindowText(dlg, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHAUTHBANNER, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_TIS_BANNER", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHAUTHBANNER, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDOK, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("BTN_OK", pvar, uimsg);
-	SetDlgItemText(dlg, IDOK, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDCANCEL, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("BTN_DISCONNECT", pvar, uimsg);
-	SetDlgItemText(dlg, IDCANCEL, pvar->ts->UIMsg);
-
 	init_auth_machine_banner(pvar, dlg);
 	init_password_control(pvar, dlg, IDC_SSHPASSWORD, NULL);
 
@@ -1458,6 +1447,7 @@
 		HWND cur_active = GetActiveWindow();
 		DLGPROC dlg_proc;
 		LPCTSTR dialog_template;
+		INT_PTR r;
 
 		switch (pvar->auth_state.mode) {
 		case TIS_AUTH_MODE:
@@ -1470,10 +1460,11 @@
 			dlg_proc = auth_dlg_proc;
 		}
 
-		if (!DialogBoxParam(hInst, dialog_template,
-		                    cur_active !=
-		                    NULL ? cur_active : pvar->NotificationWindow,
-		                    dlg_proc, (LPARAM) pvar) == -1) {
+		r = DialogBoxParam(hInst, dialog_template,
+						   cur_active !=
+						   NULL ? cur_active : pvar->NotificationWindow,
+						   dlg_proc, (LPARAM) pvar);
+		if (r == -1) {
 			UTIL_get_lang_msg("MSG_CREATEWINDOW_AUTH_ERROR", pvar,
 			                  "Unable to display authentication dialog box.\n"
 			                  "Connection terminated.");

Modified: branches/unicode_buf/ttssh2/ttxssh/fwd.c
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/fwd.c	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/ttssh2/ttxssh/fwd.c	2019-10-02 15:09:00 UTC (rev 8253)
@@ -310,14 +310,28 @@
 
 	channel = pvar->fwd_state.channels + local_channel_num;
 
-	if (channel->local_socket != INVALID_SOCKET) {
-		shutdown(channel->local_socket, 1);
-	}
 	channel->status |= FWD_CLOSED_REMOTE_IN;
-	if ((channel->status & FWD_CLOSED_REMOTE_OUT) == FWD_CLOSED_REMOTE_OUT) {
-		closed_local_connection(pvar, local_channel_num);
-		FWD_free_channel(pvar, local_channel_num);
+
+	logprintf(LOG_LEVEL_VERBOSE, "%s: SSH_MSG_CHANNEL_EOF receive. channel: %d", __FUNCTION__, local_channel_num);
+
+	if (channel->writebuf.datalen == 0) {
+		// \x83N\x83\x89\x83C\x83A\x83\x93\x83g\x82֑\x97\x82\xE9\x83f\x81[\x83^\x82\xAA\x8Ec\x82\xC1\x82Ă\xA2\x82Ȃ\xA2\x8Fꍇ\x82̓R\x83l\x83N\x83V\x83\x87\x83\x93\x82\xF0 shutdown \x82\xB7\x82\xE9
+		logprintf(LOG_LEVEL_VERBOSE,
+		          "%s: shutdown local socket. channel: %d", __FUNCTION__, local_channel_num);
+		if (channel->local_socket != INVALID_SOCKET) {
+			shutdown(channel->local_socket, 1);
+		}
+		if ((channel->status & FWD_CLOSED_REMOTE_OUT) == FWD_CLOSED_REMOTE_OUT) {
+			closed_local_connection(pvar, local_channel_num);
+			FWD_free_channel(pvar, local_channel_num);
+		}
 	}
+	else {
+		// \x83o\x83b\x83t\x83@\x82Ƀf\x81[\x83^\x82\xAA\x8Ec\x82\xC1\x82Ă\xA2\x82\xE9\x8Fꍇ\x82͂\xB1\x82\xB1\x82ł\xCD shutdown \x8Fo\x97\x88\x82Ȃ\xA2
+		// write_local_connection_buffer() \x82Ńf\x81[\x83^\x82\xAA\x82\xB7\x82ׂđ\x97\x82\xE8\x8FI\x82\xED\x82\xC1\x82\xBD\x8E\x9E\x82\xC9 shutdown \x82\xAA\x8Ds\x82\xED\x82\xEA\x82\xE9
+		logprintf(LOG_LEVEL_VERBOSE, "%s: buffer not empty. channel: %d, remained data length: %d",
+		          __FUNCTION__, local_channel_num, channel->writebuf.datalen);
+	}
 }
 
 void FWD_channel_output_eof(PTInstVar pvar, uint32 local_channel_num)
@@ -659,11 +673,30 @@
 {
 	FWDChannel *channel = pvar->fwd_state.channels + channel_num;
 
+	if (channel->writebuf.datalen == 0) {
+		logprintf(LOG_LEVEL_VERBOSE, "%s: write buffer is empty. channel: %d", __FUNCTION__, channel_num);
+		return;
+	}
+
+	logprintf(LOG_LEVEL_VERBOSE, "%s: remained data length: %d, channel: %d", __FUNCTION__,
+	          channel->writebuf.datalen, channel_num);
+
 	if ((channel->status & FWD_BOTH_CONNECTED) == FWD_BOTH_CONNECTED) {
 		if (!UTIL_sock_write_more
 			(pvar, &channel->writebuf, channel->local_socket)) {
 			channel_error(pvar, "writing", channel_num, WSAGetLastError());
 		}
+		if (channel->writebuf.datalen == 0 && (channel->status & FWD_CLOSED_REMOTE_IN) == FWD_CLOSED_REMOTE_IN) {
+			// \x83N\x83\x89\x83C\x83A\x83\x93\x83g\x82ւ̃f\x81[\x83^\x82\xAA\x82\xB7\x82ׂđ\x97\x82\xE8\x8FI\x82\xED\x82\xC1\x82Ă\xA8\x82\xE8\x81A\x83\x8A\x83\x82\x81[\x83g\x82\xA9\x82\xE7\x82\xCC EOF \x82\xF0\x8E\xF3\x90M\x8Dς݂Ȃ\xE7\x82\xCE
+			// \x83N\x83\x89\x83C\x83A\x83\x93\x83g\x82ւ̃R\x83l\x83N\x83V\x83\x87\x83\x93\x82\xF0 shutdown \x82\xB7\x82\xE9 (\x91\x97\x90M\x95\xFB\x8C\xFC\x82̂\xDD)
+			logprintf(LOG_LEVEL_VERBOSE,
+				  "%s: shutdown local socket. channel: %d", __FUNCTION__, channel_num);
+			shutdown(channel->local_socket, 1);
+			if ((channel->status & FWD_CLOSED_REMOTE_OUT) == FWD_CLOSED_REMOTE_OUT) {
+				closed_local_connection(pvar, channel_num);
+				FWD_free_channel(pvar, channel_num);
+			}
+		}
 	}
 }
 

Modified: branches/unicode_buf/ttssh2/ttxssh/fwdui.c
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/fwdui.c	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/ttssh2/ttxssh/fwdui.c	2019-10-02 15:09:00 UTC (rev 8253)
@@ -498,39 +498,20 @@
 	FWDRequestSpec *requests =
 		(FWDRequestSpec *) malloc(sizeof(FWDRequestSpec) * num_specs);
 	int i;
-	char uimsg[MAX_UIMSG];
+	const static DlgTextInfo text_info[] = {
+		{ 0, "DLG_FWD_TITLE" },
+		{ IDC_PORTFORWARD, "DLG_FWDSETUP_LIST" },
+		{ IDC_ADD, "DLG_FWDSETUP_ADD" },
+		{ IDC_EDIT, "DLG_FWDSETUP_EDIT" },
+		{ IDC_REMOVE, "DLG_FWDSETUP_REMOVE" },
+		{ IDC_XFORWARD, "DLG_FWDSETUP_X" },
+		{ IDC_SSHFWDX11, "DLG_FWDSETUP_XAPP" },
+		{ IDOK, "BTN_OK" },
+		{ IDCANCEL, "BTN_CANCEL" },
+		{ IDC_SSHFWDSETUP_HELP, "BTN_HELP" },
+	};
+	SetI18DlgStrs("TTSSH", dlg, text_info, _countof(text_info), pvar->ts->UILanguageFile);
 
-	GetWindowText(dlg, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWD_TITLE", pvar, uimsg);
-	SetWindowText(dlg, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_PORTFORWARD, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWDSETUP_LIST", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_PORTFORWARD, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_ADD, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWDSETUP_ADD", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_ADD, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_EDIT, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWDSETUP_EDIT", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_EDIT, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_REMOVE, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWDSETUP_REMOVE", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_REMOVE, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_XFORWARD, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWDSETUP_X", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_XFORWARD, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHFWDX11, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWDSETUP_XAPP", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHFWDX11, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDOK, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("BTN_OK", pvar, uimsg);
-	SetDlgItemText(dlg, IDOK, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDCANCEL, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("BTN_CANCEL", pvar, uimsg);
-	SetDlgItemText(dlg, IDCANCEL, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHFWDSETUP_HELP, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("BTN_HELP", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHFWDSETUP_HELP, pvar->ts->UIMsg);
-
 	FWD_get_request_specs(pvar, requests, num_specs);
 
 	for (i = 0; i < num_specs; i++) {
@@ -804,51 +785,24 @@
 
 static void init_fwd_edit_dlg(PTInstVar pvar, FWDRequestSpec *spec, HWND dlg)
 {
-	char uimsg[MAX_UIMSG];
+	const static DlgTextInfo text_info[] = {
+		{ 0, "DLG_FWD_TITLE" },
+		{ IDD_SSHFWDBANNER, "DLG_FWD_BANNER" },
+		{ IDC_SSHFWDLOCALTOREMOTE, "DLG_FWD_LOCAL_PORT" },
+		{ IDC_SSHFWDLOCALTOREMOTE_LISTEN, "DLG_FWD_LOCAL_LISTEN" },
+		{ IDC_SSHFWDLOCALTOREMOTE_HOST, "DLG_FWD_LOCAL_REMOTE" },
+		{ IDC_SSHFWDLOCALTOREMOTE_PORT, "DLG_FWD_LOCAL_REMOTE_PORT" },
+		{ IDC_SSHFWDREMOTETOLOCAL, "DLG_FWD_REMOTE_PORT" },
+		{ IDC_SSHFWDREMOTETOLOCAL_LISTEN, "DLG_FWD_REMOTE_LISTEN" },
+		{ IDC_SSHFWDREMOTETOLOCAL_HOST, "DLG_FWD_REMOTE_LOCAL" },
+		{ IDC_SSHFWDREMOTETOLOCAL_PORT, "DLG_FWD_REMOTE_LOCAL_PORT" },
+		{ IDC_SSHFWDLOCALDYNAMIC, "DLG_FWD_DYNAMIC_PORT" },
+		{ IDC_SSHFWDLOCALDYNAMIC_LISTEN, "DLG_FWD_DYNAMIC_LISTEN" },
+		{ IDOK, "BTN_OK" },
+		{ IDCANCEL, "BTN_CANCEL" },
+	};
+	SetI18DlgStrs("TTSSH", dlg, text_info, _countof(text_info), pvar->ts->UILanguageFile);
 
-	GetWindowText(dlg, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWD_TITLE", pvar, uimsg);
-	SetWindowText(dlg, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDD_SSHFWDBANNER, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWD_BANNER", pvar, uimsg);
-	SetDlgItemText(dlg, IDD_SSHFWDBANNER, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHFWDLOCALTOREMOTE, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWD_LOCAL_PORT", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHFWDLOCALTOREMOTE, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHFWDLOCALTOREMOTE_LISTEN, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWD_LOCAL_LISTEN", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHFWDLOCALTOREMOTE_LISTEN, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHFWDLOCALTOREMOTE_HOST, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWD_LOCAL_REMOTE", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHFWDLOCALTOREMOTE_HOST, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHFWDLOCALTOREMOTE_PORT, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWD_LOCAL_REMOTE_PORT", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHFWDLOCALTOREMOTE_PORT, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHFWDREMOTETOLOCAL, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWD_REMOTE_PORT", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHFWDREMOTETOLOCAL, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHFWDREMOTETOLOCAL_LISTEN, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWD_REMOTE_LISTEN", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHFWDREMOTETOLOCAL_LISTEN, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHFWDREMOTETOLOCAL_HOST, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWD_REMOTE_LOCAL", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHFWDREMOTETOLOCAL_HOST, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHFWDREMOTETOLOCAL_PORT, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWD_REMOTE_LOCAL_PORT", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHFWDREMOTETOLOCAL_PORT, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHFWDLOCALDYNAMIC, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWD_DYNAMIC_PORT", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHFWDLOCALDYNAMIC, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHFWDLOCALDYNAMIC_LISTEN, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_FWD_DYNAMIC_LISTEN", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHFWDLOCALDYNAMIC_LISTEN, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDOK, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("BTN_OK", pvar, uimsg);
-	SetDlgItemText(dlg, IDOK, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDCANCEL, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("BTN_CANCEL", pvar, uimsg);
-	SetDlgItemText(dlg, IDCANCEL, pvar->ts->UIMsg);
-
 	switch (spec->type) {
 	case FWD_REMOTE_TO_LOCAL:
 		setup_edit_controls(dlg, spec, IDC_SSHFWDREMOTETOLOCAL,

Modified: branches/unicode_buf/ttssh2/ttxssh/hosts.c
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/hosts.c	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/ttssh2/ttxssh/hosts.c	2019-10-02 15:09:00 UTC (rev 8253)
@@ -1726,8 +1726,17 @@
 static INT_PTR CALLBACK hosts_add_dlg_proc(HWND dlg, UINT msg, WPARAM wParam,
 										   LPARAM lParam)
 {
+	const static DlgTextInfo text_info[] = {
+		{ 0, "DLG_UNKNOWNHOST_TITLE" },
+		{ IDC_HOSTWARNING, "DLG_UNKNOWNHOST_WARNING" },
+		{ IDC_HOSTWARNING2, "DLG_UNKNOWNHOST_WARNING2" },
+		{ IDC_HOSTFINGERPRINT, "DLG_UNKNOWNHOST_FINGERPRINT" },
+		{ IDC_FP_HASH_ALG, "DLG_UNKNOWNHOST_FP_HASH_ALGORITHM" },
+		{ IDC_ADDTOKNOWNHOSTS, "DLG_UNKNOWNHOST_ADD" },
+		{ IDC_CONTINUE, "BTN_CONTINUE" },
+		{ IDCANCEL, "BTN_DISCONNECT" },
+	};
 	PTInstVar pvar;
-	char uimsg[MAX_UIMSG];
 
 	switch (msg) {
 	case WM_INITDIALOG:
@@ -1736,30 +1745,7 @@
 		SetWindowLongPtr(dlg, DWLP_USER, lParam);
 
 		// \x92lj\xC1\x81E\x92u\x82\xAB\x8A\xB7\x82\xA6\x82Ƃ\xE0 init_hosts_dlg \x82\xF0\x8CĂ\xF1\x82ł\xA2\x82\xE9\x82̂ŁA\x82\xBB\x82̑O\x82ɃZ\x83b\x83g\x82\xB7\x82\xE9\x95K\x97v\x82\xAA\x82\xA0\x82\xE9
-		GetWindowText(dlg, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_UNKNOWNHOST_TITLE", pvar, uimsg);
-		SetWindowText(dlg, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTWARNING, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_UNKNOWNHOST_WARNING", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTWARNING, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTWARNING2, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_UNKNOWNHOST_WARNING2", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTWARNING2, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTFINGERPRINT, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_UNKNOWNHOST_FINGERPRINT", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTFINGERPRINT, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_FP_HASH_ALG, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_UNKNOWNHOST_FP_HASH_ALGORITHM", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_FP_HASH_ALG, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_ADDTOKNOWNHOSTS, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_UNKNOWNHOST_ADD", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_ADDTOKNOWNHOSTS, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_CONTINUE, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("BTN_CONTINUE", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_CONTINUE, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDCANCEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("BTN_DISCONNECT", pvar, uimsg);
-		SetDlgItemText(dlg, IDCANCEL, pvar->ts->UIMsg);
+		SetI18DlgStrs("TTSSH", dlg, text_info, _countof(text_info), pvar->ts->UILanguageFile);
 
 		switch (pvar->dns_key_check) {
 		case DNS_VERIFY_NOTFOUND:
@@ -1897,8 +1883,17 @@
 static INT_PTR CALLBACK hosts_replace_dlg_proc(HWND dlg, UINT msg, WPARAM wParam,
 											   LPARAM lParam)
 {
+	const static DlgTextInfo text_info[] = {
+		{ 0, "DLG_UNKNOWNHOST_TITLE" },
+		{ IDC_HOSTWARNING, "DLG_DIFFERENTKEY_WARNING" },
+		{ IDC_HOSTWARNING2, "DLG_DIFFERENTKEY_WARNING2" },
+		{ IDC_HOSTFINGERPRINT, "DLG_DIFFERENTKEY_FINGERPRINT" },
+		{ IDC_FP_HASH_ALG, "DLG_DIFFERENTKEY_FP_HASH_ALGORITHM" },
+		{ IDC_ADDTOKNOWNHOSTS, "DLG_DIFFERENTKEY_REPLACE" },
+		{ IDC_CONTINUE, "BTN_CONTINUE" },
+		{ IDCANCEL, "BTN_DISCONNECT" },
+	};
 	PTInstVar pvar;
-	char uimsg[MAX_UIMSG];
 
 	switch (msg) {
 	case WM_INITDIALOG:
@@ -1907,30 +1902,7 @@
 		SetWindowLongPtr(dlg, DWLP_USER, lParam);
 
 		// \x92lj\xC1\x81E\x92u\x82\xAB\x8A\xB7\x82\xA6\x82Ƃ\xE0 init_hosts_dlg \x82\xF0\x8CĂ\xF1\x82ł\xA2\x82\xE9\x82̂ŁA\x82\xBB\x82̑O\x82ɃZ\x83b\x83g\x82\xB7\x82\xE9\x95K\x97v\x82\xAA\x82\xA0\x82\xE9
-		GetWindowText(dlg, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_DIFFERENTKEY_TITLE", pvar, uimsg);
-		SetWindowText(dlg, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTWARNING, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_DIFFERENTKEY_WARNING", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTWARNING, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTWARNING2, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_DIFFERENTKEY_WARNING2", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTWARNING2, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTFINGERPRINT, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_DIFFERENTKEY_FINGERPRINT", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTFINGERPRINT, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_FP_HASH_ALG, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_DIFFERENTKEY_FP_HASH_ALGORITHM", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_FP_HASH_ALG, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_ADDTOKNOWNHOSTS, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_DIFFERENTKEY_REPLACE", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_ADDTOKNOWNHOSTS, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_CONTINUE, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("BTN_CONTINUE", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_CONTINUE, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDCANCEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("BTN_DISCONNECT", pvar, uimsg);
-		SetDlgItemText(dlg, IDCANCEL, pvar->ts->UIMsg);
+		SetI18DlgStrs("TTSSH", dlg, text_info, _countof(text_info), pvar->ts->UILanguageFile);
 
 		switch (pvar->dns_key_check) {
 		case DNS_VERIFY_NOTFOUND:
@@ -2066,8 +2038,17 @@
 static INT_PTR CALLBACK hosts_add2_dlg_proc(HWND dlg, UINT msg, WPARAM wParam,
 											LPARAM lParam)
 {
+	const static DlgTextInfo text_info[] = {
+		{ 0, "DLG_DIFFERENTTYPEKEY_TITLE" },
+		{ IDC_HOSTWARNING, "DLG_DIFFERENTTYPEKEY_WARNING" },
+		{ IDC_HOSTWARNING2, "DLG_DIFFERENTTYPEKEY_WARNING2" },
+		{ IDC_HOSTFINGERPRINT, "DLG_DIFFERENTTYPEKEY_FINGERPRINT" },
+		{ IDC_FP_HASH_ALG, "DLG_DIFFERENTTYPEKEY_FP_HASH_ALGORITHM" },
+		{ IDC_ADDTOKNOWNHOSTS, "DLG_DIFFERENTTYPEKEY_ADD" },
+		{ IDC_CONTINUE, "BTN_CONTINUE" },
+		{ IDCANCEL, "BTN_DISCONNECT" },
+	};
 	PTInstVar pvar;
-	char uimsg[MAX_UIMSG];
 
 	switch (msg) {
 	case WM_INITDIALOG:
@@ -2076,30 +2057,7 @@
 		SetWindowLongPtr(dlg, DWLP_USER, lParam);
 
 		// \x92lj\xC1\x81E\x92u\x82\xAB\x8A\xB7\x82\xA6\x82Ƃ\xE0 init_hosts_dlg \x82\xF0\x8CĂ\xF1\x82ł\xA2\x82\xE9\x82̂ŁA\x82\xBB\x82̑O\x82ɃZ\x83b\x83g\x82\xB7\x82\xE9\x95K\x97v\x82\xAA\x82\xA0\x82\xE9
-		GetWindowText(dlg, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_DIFFERENTTYPEKEY_TITLE", pvar, uimsg);
-		SetWindowText(dlg, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTWARNING, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_DIFFERENTTYPEKEY_WARNING", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTWARNING, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTWARNING2, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_DIFFERENTTYPEKEY_WARNING2", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTWARNING2, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTFINGERPRINT, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_DIFFERENTTYPEKEY_FINGERPRINT", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTFINGERPRINT, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_FP_HASH_ALG, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_DIFFERENTTYPEKEY_FP_HASH_ALGORITHM", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_FP_HASH_ALG, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_ADDTOKNOWNHOSTS, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_DIFFERENTTYPEKEY_ADD", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_ADDTOKNOWNHOSTS, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_CONTINUE, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("BTN_CONTINUE", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_CONTINUE, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDCANCEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("BTN_DISCONNECT", pvar, uimsg);
-		SetDlgItemText(dlg, IDCANCEL, pvar->ts->UIMsg);
+		SetI18DlgStrs("TTSSH", dlg, text_info, _countof(text_info), pvar->ts->UILanguageFile);
 
 		switch (pvar->dns_key_check) {
 		case DNS_VERIFY_NOTFOUND:

Modified: branches/unicode_buf/ttssh2/ttxssh/ssh.c
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ssh.c	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/ttssh2/ttxssh/ssh.c	2019-10-02 15:09:00 UTC (rev 8253)
@@ -9606,7 +9606,7 @@
 
 	} else if (c->type == TYPE_PORTFWD) {
 		// CHANNEL_CLOSE \x82𑗂\xE8\x95Ԃ\xB3\x82Ȃ\xA2\x82ƃ\x8A\x83\x82\x81[\x83g\x82\xCCchannel\x82\xAA\x8AJ\x95\xFA\x82\xB3\x82\xEA\x82Ȃ\xA2
-		// c.f. RFC 4253 5.3. Closing a Channel
+		// c.f. RFC 4254 5.3. Closing a Channel
 		ssh2_channel_send_close(pvar, c);
 
 		// \x93]\x91\x97\x83`\x83\x83\x83l\x83\x8B\x93\xE0\x82ɂ\xA0\x82\xE9\x83\\x83P\x83b\x83g\x82̉\xF0\x95\xFA\x98R\x82\xEA\x82\xF0\x8FC\x90\xB3 (2007.7.26 maya)

Modified: branches/unicode_buf/ttssh2/ttxssh/ttxssh.c
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ttxssh.c	2019-10-02 15:08:25 UTC (rev 8252)
+++ branches/unicode_buf/ttssh2/ttxssh/ttxssh.c	2019-10-02 15:09:00 UTC (rev 8253)
@@ -1285,6 +1285,21 @@
 static INT_PTR CALLBACK TTXHostDlg(HWND dlg, UINT msg, WPARAM wParam,
 								   LPARAM lParam)
 {
+	const static DlgTextInfo text_info[] = {
+		{ 0, "DLG_HOST_TITLE" },
+		{ IDC_HOSTNAMELABEL, "DLG_HOST_TCPIPHOST" },
+		{ IDC_HISTORY, "DLG_HOST_TCPIPHISTORY" },
+		{ IDC_SERVICELABEL, "DLG_HOST_TCPIPSERVICE" },
+		{ IDC_HOSTOTHER, "DLG_HOST_TCPIPOTHER" },
+		{ IDC_HOSTTCPPORTLABEL, "DLG_HOST_TCPIPPORT" },
+		{ IDC_SSH_VERSION_LABEL, "DLG_HOST_TCPIPSSHVERSION" },
+		{ IDC_HOSTTCPPROTOCOLLABEL, "DLG_HOST_TCPIPPROTOCOL" },
+		{ IDC_HOSTSERIAL, "DLG_HOST_SERIAL" },
+		{ IDC_HOSTCOMLABEL, "DLG_HOST_SERIALPORT" },
+		{ IDC_HOSTHELP, "DLG_HOST_HELP" },
+		{ IDOK, "BTN_OK" },
+		{ IDCANCEL, "BTN_CANCEL" },
+	};
 	static char *ssh_version[] = {"SSH1", "SSH2", NULL};
 	PGetHNRec GetHNRec;
 	char EntName[128];
@@ -1294,7 +1309,6 @@
 	static char *ComPortDesc[MAXCOMPORT];
 	int comports;
 	BOOL Ok;
-	char uimsg[MAX_UIMSG];
 	static HWND hwndHostname     = NULL; // HOSTNAME dropdown
 	static HWND hwndHostnameEdit = NULL; // Edit control on HOSTNAME dropdown
 
@@ -1303,45 +1317,7 @@
 		GetHNRec = (PGetHNRec) lParam;
 		SetWindowLongPtr(dlg, DWLP_USER, lParam);
 
-		GetWindowText(dlg, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_HOST_TITLE", pvar, uimsg);
-		SetWindowText(dlg, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTNAMELABEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_HOST_TCPIPHOST", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTNAMELABEL, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HISTORY, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_HOST_TCPIPHISTORY", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HISTORY, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_SERVICELABEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_HOST_TCPIPSERVICE", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_SERVICELABEL, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTOTHER, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_HOST_TCPIPOTHER", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTOTHER, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTTCPPORTLABEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_HOST_TCPIPPORT", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTTCPPORTLABEL, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_SSH_VERSION_LABEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_HOST_TCPIPSSHVERSION", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_SSH_VERSION_LABEL, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTTCPPROTOCOLLABEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_HOST_TCPIPPROTOCOL", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTTCPPROTOCOLLABEL, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTSERIAL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_HOST_SERIAL", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTSERIAL, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTCOMLABEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_HOST_SERIALPORT", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTCOMLABEL, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_HOSTHELP, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_HOST_HELP", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_HOSTHELP, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDOK, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("BTN_OK", pvar, uimsg);
-		SetDlgItemText(dlg, IDOK, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDCANCEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("BTN_CANCEL", pvar, uimsg);
-		SetDlgItemText(dlg, IDCANCEL, pvar->ts->UIMsg);
+		SetI18DlgStrs("TTSSH", dlg, text_info, _countof(text_info), pvar->ts->UILanguageFile);
 
 		// \x83z\x83X\x83g\x83q\x83X\x83g\x83\x8A\x82̃`\x83F\x83b\x83N\x83{\x83b\x83N\x83X\x82\xF0\x92lj\xC1 (2005.10.21 yutaka)
 		if (pvar->ts->HistoryList > 0) {
@@ -2386,18 +2362,13 @@
 static void init_about_dlg(PTInstVar pvar, HWND dlg)
 {
 	char buf[1024];
-	char uimsg[MAX_UIMSG];
+	const static DlgTextInfo text_info[] = {
+		{ 0, "DLG_ABOUT_TITLE" },
+		{ IDC_FP_HASH_ALG, "DLG_ABOUT_FP_HASH_ALGORITHM" },
+		{ IDOK, "BTN_OK" },
+	};
+	SetI18DlgStrs("TTSSH", dlg, text_info, _countof(text_info), pvar->ts->UILanguageFile);
 
-	GetWindowText(dlg, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_ABOUT_TITLE", pvar, uimsg);
-	SetWindowText(dlg, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_FP_HASH_ALG, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_ABOUT_FP_HASH_ALGORITHM", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_FP_HASH_ALG, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDOK, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("BTN_OK", pvar, uimsg);
-	SetDlgItemText(dlg, IDOK, pvar->ts->UIMsg);
-
 	// TTSSH\x82̃o\x81[\x83W\x83\x87\x83\x93\x82\xF0\x90ݒ肷\x82\xE9 (2005.2.28 yutaka)
 	_snprintf_s(buf, sizeof(buf), _TRUNCATE,
 	            "TTSSH\r\nTera Term Secure Shell extension, %d.%d\r\nCompatible with SSH protocol version 1.5 and 2.0", TTSSH_VERSION_MAJOR, TTSSH_VERSION_MINOR);
@@ -2642,139 +2613,65 @@
 	HWND hostkeyRotationControlList = GetDlgItem(dlg, IDC_HOSTKEY_ROTATION_COMBO);
 	int i;
 	int ch;
-	char uimsg[MAX_UIMSG];
-	char *rotationItem[SSH_UPDATE_HOSTKEYS_MAX] = {
+	static const char *rotationItem[SSH_UPDATE_HOSTKEYS_MAX] = {
 		"No",
 		"Yes",
 		"Ask",
 	};
-	char *rotationItemKey[SSH_UPDATE_HOSTKEYS_MAX] = {
+	static const char *rotationItemKey[SSH_UPDATE_HOSTKEYS_MAX] = {
 		"DLG_SSHSETUP_HOSTKEY_ROTATION_NO",
 		"DLG_SSHSETUP_HOSTKEY_ROTATION_YES",
 		"DLG_SSHSETUP_HOSTKEY_ROTATION_ASK",
 	};
 
-	GetWindowText(dlg, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_TITLE", pvar, uimsg);
-	SetWindowText(dlg, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_COMPRESSLABEL, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_COMPRESS", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_COMPRESSLABEL, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_COMPRESSNONE, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_COMPRESS_NONE", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_COMPRESSNONE, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_COMPRESSHIGH, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_COMPRESS_HIGHEST", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_COMPRESSHIGH, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_COMPRESSNOTE, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_COMPRESS_NOTE", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_COMPRESSNOTE, pvar->ts->UIMsg);
+	const static DlgTextInfo text_info[] = {
+		{ 0, "DLG_SSHSETUP_TITLE" },
+		{ IDC_COMPRESSLABEL, "DLG_SSHSETUP_COMPRESS" },
+		{ IDC_COMPRESSNONE, "DLG_SSHSETUP_COMPRESS_NONE" },
+		{ IDC_COMPRESSHIGH, "DLG_SSHSETUP_COMPRESS_HIGHEST" },
+		{ IDC_COMPRESSNOTE, "DLG_SSHSETUP_COMPRESS_NOTE" },
 
-	GetDlgItemText(dlg, IDC_CIPHERORDER, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_CIPHER", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_CIPHERORDER, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHMOVECIPHERUP, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_CIPHER_UP", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHMOVECIPHERUP, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHMOVECIPHERDOWN, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_CIPHER_DOWN", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHMOVECIPHERDOWN, pvar->ts->UIMsg);
+		{ IDC_CIPHERORDER, "DLG_SSHSETUP_CIPHER" },
+		{ IDC_SSHMOVECIPHERUP, "DLG_SSHSETUP_CIPHER_UP" },
+		{ IDC_SSHMOVECIPHERDOWN, "DLG_SSHSETUP_CIPHER_DOWN" },
 
-	GetDlgItemText(dlg, IDC_KEX_ORDER, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_KEX", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_KEX_ORDER, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHKEX_MOVEUP, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_KEX_UP", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHKEX_MOVEUP, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHKEX_MOVEDOWN, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_KEX_DOWN", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHKEX_MOVEDOWN, pvar->ts->UIMsg);
+		{ IDC_KEX_ORDER, "DLG_SSHSETUP_KEX" },
+		{ IDC_SSHKEX_MOVEUP, "DLG_SSHSETUP_KEX_UP" },
+		{ IDC_SSHKEX_MOVEDOWN, "DLG_SSHSETUP_KEX_DOWN" },
 
-	GetDlgItemText(dlg, IDC_HOST_KEY_ORDER, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_HOST_KEY", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_HOST_KEY_ORDER, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHHOST_KEY_MOVEUP, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_HOST_KEY_UP", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHHOST_KEY_MOVEUP, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHHOST_KEY_MOVEDOWN, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_HOST_KEY_DOWN", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHHOST_KEY_MOVEDOWN, pvar->ts->UIMsg);
+		{ IDC_HOST_KEY_ORDER, "DLG_SSHSETUP_HOST_KEY" },
+		{ IDC_SSHHOST_KEY_MOVEUP, "DLG_SSHSETUP_HOST_KEY_UP" },
+		{ IDC_SSHHOST_KEY_MOVEDOWN, "DLG_SSHSETUP_HOST_KEY_DOWN" },
 
-	GetDlgItemText(dlg, IDC_MAC_ORDER, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_MAC", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_MAC_ORDER, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHMAC_MOVEUP, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_MAC_UP", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHMAC_MOVEUP, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHMAC_MOVEDOWN, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_MAC_DOWN", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHMAC_MOVEDOWN, pvar->ts->UIMsg);
+		{ IDC_MAC_ORDER, "DLG_SSHSETUP_MAC" },
+		{ IDC_SSHMAC_MOVEUP, "DLG_SSHSETUP_MAC_UP" },
+		{ IDC_SSHMAC_MOVEDOWN, "DLG_SSHSETUP_MAC_DOWN" },
 
-	GetDlgItemText(dlg, IDC_COMP_ORDER, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_COMP", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_COMP_ORDER, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHCOMP_MOVEUP, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_COMP_UP", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHCOMP_MOVEUP, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHCOMP_MOVEDOWN, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_COMP_DOWN", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHCOMP_MOVEDOWN, pvar->ts->UIMsg);
+		{ IDC_COMP_ORDER, "DLG_SSHSETUP_COMP" },
+		{ IDC_SSHCOMP_MOVEUP, "DLG_SSHSETUP_COMP_UP" },
+		{ IDC_SSHCOMP_MOVEDOWN, "DLG_SSHSETUP_COMP_DOWN" },
 
-	GetDlgItemText(dlg, IDC_KNOWNHOSTS, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_KNOWNHOST", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_KNOWNHOSTS, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_CHOOSEREADWRITEFILE, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_KNOWNHOST_RW", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_CHOOSEREADWRITEFILE, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_CHOOSEREADONLYFILE, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_KNOWNHOST_RO", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_CHOOSEREADONLYFILE, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_HEARTBEATLABEL, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_HEARTBEAT", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_HEARTBEATLABEL, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_HEARTBEATLABEL2, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_HEARTBEAT_UNIT", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_HEARTBEATLABEL2, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_REMEMBERPASSWORD, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_PASSWORD", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_REMEMBERPASSWORD, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_FORWARDAGENT, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_FORWARDAGENT", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_FORWARDAGENT, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_FORWARDAGENTCONFIRM, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_FORWARDAGENTCONFIRM", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_FORWARDAGENTCONFIRM, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_FORWARDAGENTNOTIFY, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_FORWARDAGENTNOTIFY", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_FORWARDAGENTNOTIFY, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_VERIFYHOSTKEYDNS, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_VERIFYHOSTKEYDNS", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_VERIFYHOSTKEYDNS, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_NOTICEBANNER, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_NOTICE", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_NOTICEBANNER, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDOK, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("BTN_OK", pvar, uimsg);
-	SetDlgItemText(dlg, IDOK, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDCANCEL, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("BTN_CANCEL", pvar, uimsg);
-	SetDlgItemText(dlg, IDCANCEL, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_SSHSETUP_HELP, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("BTN_HELP", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_SSHSETUP_HELP, pvar->ts->UIMsg);
+		{ IDC_KNOWNHOSTS, "DLG_SSHSETUP_KNOWNHOST" },
+		{ IDC_CHOOSEREADWRITEFILE, "DLG_SSHSETUP_KNOWNHOST_RW" },
+		{ IDC_CHOOSEREADONLYFILE, "DLG_SSHSETUP_KNOWNHOST_RO" },
+		{ IDC_HEARTBEATLABEL, "DLG_SSHSETUP_HEARTBEAT" },
+		{ IDC_HEARTBEATLABEL2, "DLG_SSHSETUP_HEARTBEAT_UNIT" },
+		{ IDC_REMEMBERPASSWORD, "DLG_SSHSETUP_PASSWORD" },
+		{ IDC_FORWARDAGENT, "DLG_SSHSETUP_FORWARDAGENT" },
+		{ IDC_FORWARDAGENTCONFIRM, "DLG_SSHSETUP_FORWARDAGENTCONFIRM" },
+		{ IDC_FORWARDAGENTNOTIFY, "DLG_SSHSETUP_FORWARDAGENTNOTIFY" },
+		{ IDC_VERIFYHOSTKEYDNS, "DLG_SSHSETUP_VERIFYHOSTKEYDNS" },
+		{ IDC_NOTICEBANNER, "DLG_SSHSETUP_NOTICE" },
+		{ IDOK, "BTN_OK" },
+		{ IDCANCEL, "BTN_CANCEL" },
+		{ IDC_SSHSETUP_HELP, "BTN_HELP" },
 
-	GetDlgItemText(dlg, IDC_HOSTKEY_ROTATION_STATIC, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_HOSTKEY_ROTATION", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_HOSTKEY_ROTATION_STATIC, pvar->ts->UIMsg);
+		{ IDC_HOSTKEY_ROTATION_STATIC, "DLG_SSHSETUP_HOSTKEY_ROTATION" },
+		{ IDC_LOGLEVEL, "DLG_SSHSETUP_LOGLEVEL" },
+		{ IDC_LOGLEVEL_UNIT, "DLG_SSHSETUP_LOGLEVEL_UNIT" },
+	};
+	SetI18DlgStrs("TTSSH", dlg, text_info, _countof(text_info), pvar->ts->UILanguageFile);
 
-	GetDlgItemText(dlg, IDC_LOGLEVEL, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_LOGLEVEL", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_LOGLEVEL, pvar->ts->UIMsg);
-	GetDlgItemText(dlg, IDC_LOGLEVEL_UNIT, uimsg, sizeof(uimsg));
-	UTIL_get_lang_msg("DLG_SSHSETUP_LOGLEVEL_UNIT", pvar, uimsg);
-	SetDlgItemText(dlg, IDC_LOGLEVEL_UNIT, pvar->ts->UIMsg);
-
-
 	SendMessage(compressionControl, TBM_SETRANGE, TRUE, MAKELONG(0, 9));
 	SendMessage(compressionControl, TBM_SETPOS, TRUE,
 	            pvar->settings.CompressionLevel);
@@ -4259,45 +4156,22 @@
 	switch (msg) {
 	case WM_INITDIALOG:
 		{
-		GetWindowText(dlg, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_KEYGEN_TITLE", pvar, uimsg);
-		SetWindowText(dlg, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_KEYTYPE, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_KEYGEN_KEYTYPE", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_KEYTYPE, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_KEYBITS_LABEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_KEYGEN_BITS", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_KEYBITS_LABEL, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_KEY_LABEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_KEYGEN_PASSPHRASE", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_KEY_LABEL, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_CONFIRM_LABEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_KEYGEN_PASSPHRASE2", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_CONFIRM_LABEL, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_COMMENT_LABEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_KEYGEN_COMMENT", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_COMMENT_LABEL, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_SAVE_PUBLIC_KEY, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_KEYGEN_SAVEPUBLIC", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_SAVE_PUBLIC_KEY, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_SAVE_PRIVATE_KEY, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_KEYGEN_SAVEPRIVATE", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_SAVE_PRIVATE_KEY, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDOK, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_KEYGEN_GENERATE", pvar, uimsg);
-		SetDlgItemText(dlg, IDOK, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDCANCEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("BTN_CLOSE", pvar, uimsg);
-		SetDlgItemText(dlg, IDCANCEL, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_SSHKEYGENSETUP_HELP, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("BTN_HELP", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_SSHKEYGENSETUP_HELP, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_BCRYPT_KDF_CHECK, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_KEYGEN_BCRYPT_KDF", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_BCRYPT_KDF_CHECK, pvar->ts->UIMsg);
-		GetDlgItemText(dlg, IDC_BCRYPT_KDF_ROUNDS_LABEL, uimsg, sizeof(uimsg));
-		UTIL_get_lang_msg("DLG_KEYGEN_BCRYPT_ROUNDS", pvar, uimsg);
-		SetDlgItemText(dlg, IDC_BCRYPT_KDF_ROUNDS_LABEL, pvar->ts->UIMsg);
+		const static DlgTextInfo text_info[] = {
+			{ 0, "DLG_KEYGEN_TITLE" },
+			{ IDC_KEYTYPE, "DLG_KEYGEN_KEYTYPE" },
+			{ IDC_KEYBITS_LABEL, "DLG_KEYGEN_BITS" },
+			{ IDC_KEY_LABEL, "DLG_KEYGEN_PASSPHRASE" },
+			{ IDC_CONFIRM_LABEL, "DLG_KEYGEN_PASSPHRASE2" },
+			{ IDC_COMMENT_LABEL, "DLG_KEYGEN_COMMENT" },
+			{ IDC_SAVE_PUBLIC_KEY, "DLG_KEYGEN_SAVEPUBLIC" },
+			{ IDC_SAVE_PRIVATE_KEY, "DLG_KEYGEN_SAVEPRIVATE" },
+			{ IDOK, "DLG_KEYGEN_GENERATE" },
+			{ IDCANCEL, "BTN_CLOSE" },
+			{ IDC_BCRYPT_KDF_CHECK, "DLG_KEYGEN_BCRYPT_KDF" },
+			{ IDC_BCRYPT_KDF_ROUNDS_LABEL, "DLG_KEYGEN_BCRYPT_ROUNDS" },
+			{ IDC_SSHKEYGENSETUP_HELP, "BTN_HELP" },
+		};
+		SetI18DlgStrs("TTSSH", dlg, text_info, _countof(text_info), pvar->ts->UILanguageFile);
 
 		init_password_control(pvar, dlg, IDC_KEY_EDIT, NULL);
 		init_password_control(pvar, dlg, IDC_CONFIRM_EDIT, NULL);


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