Revision: 10807 https://osdn.net/projects/ttssh2/scm/svn/commits/10807 Author: zmatsuo Date: 2023-07-23 23:23:26 +0900 (Sun, 23 Jul 2023) Log Message: ----------- ホストに接続できなかったとき表示されるダイアログにhelpボタンを追加 - MessageBox() に MB_HELP を追加 - Q&Aに追記 Modified Paths: -------------- trunk/doc/en/html/about/qanda.html trunk/doc/en/teraterm.hhp trunk/doc/ja/html/about/qanda.html trunk/doc/ja/teraterm.hhp trunk/teraterm/common/helpid.h trunk/teraterm/teraterm/commlib.c trunk/teraterm/teraterm/vtwin.cpp trunk/teraterm/teraterm/vtwin.h -------------- next part -------------- Modified: trunk/doc/en/html/about/qanda.html =================================================================== --- trunk/doc/en/html/about/qanda.html 2023-07-23 07:07:41 UTC (rev 10806) +++ trunk/doc/en/html/about/qanda.html 2023-07-23 14:23:26 UTC (rev 10807) @@ -61,7 +61,7 @@ <h2>[Basic usage]</h2> <p> -<span class="qanda">Q.</span> I can not connect to a host.<br> +<span class="qanda" id="connection">Q.</span> I can not connect to a host.<br> <span class="qanda">A.</span> Please check the following things: </p> <ul> @@ -70,11 +70,30 @@ <li>Is the host name or IP address correct?</li> <li>Can you connect to the host from other machines?</li> </ul> + <p> -Please do not ask the author how to configure network properties. Please read books and magazines or ask the network administrator. +\x95\\x8E\xA6\x82\xB3\x82ꂽ\x83\x81\x83b\x83Z\x81[\x83W\x82\xF0\x8C\xB3\x82ɁA\x8E\x9F\x82̂\xB1\x82Ƃ\xF0\x8Am\x94F\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B </p> +<dl> + <dt>\x96\xB3\x8C\xF8\x82ȃz\x83X\x83g(Invalid host)</dt> + <dd> + \x83z\x83X\x83g\x96\xBC\x82\xF0\x8Eg\x82\xC1\x82Đڑ\xB1\x90\xE6\x82\xF0\x89\xF0\x8C\x88\x82\xB7\x82邱\x82Ƃ\xAA\x82ł\xAB\x82܂\xB9\x82\xF1\x82ł\xB5\x82\xBD\x81B<br> + \x83z\x83X\x83g\x96\xBC\x82\xAA\x97L\x8C\xF8\x82\xA9\x83z\x83X\x83g\x96\xBC\x82̉\xF0\x8C\x88\x82\xAA\x89\\x82\xA9\x8Am\x94F\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B + </dd> + + <dt>\x90ڑ\xB1\x82\xAA\x8B\x91\x94ۂ\xB3\x82\xEA\x82܂\xB5\x82\xBD(Connection refused)</dt> + <dd> + \x90ڑ\xB1\x90\xE6\x82̃T\x81[\x83r\x83X\x82\xAA\x93\xAE\x8D삵\x82Ă\xA2\x82Ȃ\xA2\x81A\x83t\x83@\x83C\x83A\x83E\x83H\x81[\x83\x8B\x82ŃT\x81[\x83r\x83X\x82ɐڑ\xB1\x82ł\xAB\x82Ȃ\xA2\x8F\xF3\x91Ԃł\xB7\x81B<br> + \x83T\x81[\x83r\x83X\x82̋N\x93\xAE\x81A\x83t\x83@\x83C\x83A\x83E\x83H\x81[\x83\x8B\x82̐ݒ\xE8\x82\xF0\x8Am\x94F\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B + </dd> +</dl> + <p> +\x83l\x83b\x83g\x83\x8F\x81[\x83N\x82Ɋւ\xB7\x82\xE9\x90ݒ\xE8\x82́A\x90ڑ\xB1\x82\xB5\x82Ă\xA2\x82\xE9\x83l\x83b\x83g\x83\x8F\x81[\x83N(\x83v\x83\x8D\x83o\x83C\x83_\x81[)\x82̊Ǘ\x9D\x8E҂ɖ₢\x8D\x87\x82킹\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B +</p> + +<p> <span class="qanda">Q.</span> Tera Term automatically closes when I logout a telnet host. How to disable closing?<br> <span class="qanda">A.</span> Turn "Auto window close" off in the <a href="../menu/setup-tcpip.html">[Setup] TCP/IP</a> dialog box. </p> Modified: trunk/doc/en/teraterm.hhp =================================================================== --- trunk/doc/en/teraterm.hhp 2023-07-23 07:07:41 UTC (rev 10806) +++ trunk/doc/en/teraterm.hhp 2023-07-23 14:23:26 UTC (rev 10807) @@ -58,6 +58,7 @@ HlpAboutEmulations=html\about\emulations.html HlpAboutHistory=html\about\history.html HlpAboutQanda=html\about\qanda.html +HlpAboutQandaConnect=html\about\qanda.html#connection HlpAboutRequests=html\about\requests.html HlpAboutContacts=html\about\contacts.html HlpAboutWriter=html\about\writer.html Modified: trunk/doc/ja/html/about/qanda.html =================================================================== --- trunk/doc/ja/html/about/qanda.html 2023-07-23 07:07:41 UTC (rev 10806) +++ trunk/doc/ja/html/about/qanda.html 2023-07-23 14:23:26 UTC (rev 10807) @@ -60,7 +60,7 @@ <h2>[\x8A\xEE\x96{\x93I\x82Ȏg\x82\xA2\x95\xFB]</h2> <p> -<span class="qanda">Q.</span> \x83z\x83X\x83g\x82ɐڑ\xB1\x82ł\xAB\x82Ȃ\xA2\x81B<br> +<span class="qanda" id="connection">Q.</span> \x83z\x83X\x83g\x82ɐڑ\xB1\x82ł\xAB\x82Ȃ\xA2\x81B<br> <span class="qanda">A.</span> \x88ȉ\xBA\x82̂\xB1\x82Ƃ\xF0\x8Am\x94F\x82\xB5\x82Ă݂Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B </p> <ul> @@ -69,11 +69,30 @@ <li>\x83z\x83X\x83g\x96\xBC\x82܂\xBD\x82\xCD IP \x83A\x83h\x83\x8C\x83X\x82͂\xA0\x82\xC1\x82Ă܂\xB7\x82\xA9?</li> <li>\x91\xBC\x82̃}\x83V\x83\x93\x82ł\xBB\x82̃z\x83X\x83g\x82ɐڑ\xB1\x82ł\xAB\x82܂\xB7\x82\xAA?</li> </ul> + <p> -\x83l\x83b\x83g\x83\x8F\x81[\x83N\x82Ɋւ\xB7\x82\xE9\x90ݒ\xE8\x96@\x82ɂ\xA2\x82č\xEC\x8E҂Ɏ\xBF\x96₵\x82Ȃ\xA2\x82ł\xAD\x82\xBE\x82\xB3\x82\xA2\x81B\x83C\x83\x93\x83^\x81[\x83l\x83b\x83g\x8AW\x82̓\xFC\x96发\x82\xE2\x8EG\x8E\x8F\x82\xF0\x93ǂނ\xA9\x81A\x83l\x83b\x83g\x83\x8F\x81[\x83N(\x83v\x83\x8D\x83o\x83C\x83_\x81[)\x82̊Ǘ\x9D\x8E҂ɕ\xB7\x82\xA2\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B +\x95\\x8E\xA6\x82\xB3\x82ꂽ\x83\x81\x83b\x83Z\x81[\x83W\x82\xF0\x8C\xB3\x82ɁA\x8E\x9F\x82̂\xB1\x82Ƃ\xF0\x8Am\x94F\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B </p> +<dl> + <dt>\x96\xB3\x8C\xF8\x82ȃz\x83X\x83g(Invalid host)</dt> + <dd> + \x83z\x83X\x83g\x96\xBC\x82\xF0\x8Eg\x82\xC1\x82Đڑ\xB1\x90\xE6\x82\xF0\x89\xF0\x8C\x88\x82\xB7\x82邱\x82Ƃ\xAA\x82ł\xAB\x82܂\xB9\x82\xF1\x82ł\xB5\x82\xBD\x81B<br> + \x83z\x83X\x83g\x96\xBC\x82\xAA\x97L\x8C\xF8\x82\xA9\x83z\x83X\x83g\x96\xBC\x82̉\xF0\x8C\x88\x82\xAA\x89\\x82\xA9\x8Am\x94F\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B + </dd> + + <dt>\x90ڑ\xB1\x82\xAA\x8B\x91\x94ۂ\xB3\x82\xEA\x82܂\xB5\x82\xBD(Connection refused)</dt> + <dd> + \x90ڑ\xB1\x90\xE6\x82̃T\x81[\x83r\x83X\x82\xAA\x93\xAE\x8D삵\x82Ă\xA2\x82Ȃ\xA2\x81A\x83t\x83@\x83C\x83A\x83E\x83H\x81[\x83\x8B\x82ŃT\x81[\x83r\x83X\x82ɐڑ\xB1\x82ł\xAB\x82Ȃ\xA2\x8F\xF3\x91Ԃł\xB7\x81B<br> + \x83T\x81[\x83r\x83X\x82̋N\x93\xAE\x81A\x83t\x83@\x83C\x83A\x83E\x83H\x81[\x83\x8B\x82̐ݒ\xE8\x82\xF0\x8Am\x94F\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B + </dd> +</dl> + <p> +\x83l\x83b\x83g\x83\x8F\x81[\x83N\x82Ɋւ\xB7\x82\xE9\x90ݒ\xE8\x82́A\x90ڑ\xB1\x82\xB5\x82Ă\xA2\x82\xE9\x83l\x83b\x83g\x83\x8F\x81[\x83N(\x83v\x83\x8D\x83o\x83C\x83_\x81[)\x82̊Ǘ\x9D\x8E҂ɖ₢\x8D\x87\x82킹\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B +</p> + +<p> <span class="qanda">Q.</span> Telnet \x82Ńz\x83X\x83g\x82ɐڑ\xB1\x82\xB5\x81A\x82\xBB\x82̌ネ\x83O\x83A\x83E\x83g\x82\xB5\x82\xBD\x82Ƃ\xAB\x82\xC9 Tera Term \x82\xAA\x8F\x9F\x8E\xE8\x82ɏI\x97\xB9\x82\xB5\x82Ă\xB5\x82܂\xA2\x8D\xA2\x82\xE9\x81B<br> <span class="qanda">A.</span> <a href="../menu/setup-tcpip.html">[Setup] TCP/IP</a> \x82\xCC Auto window close \x82\xF0 off \x82ɂ\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B </p> Modified: trunk/doc/ja/teraterm.hhp =================================================================== --- trunk/doc/ja/teraterm.hhp 2023-07-23 07:07:41 UTC (rev 10806) +++ trunk/doc/ja/teraterm.hhp 2023-07-23 14:23:26 UTC (rev 10807) @@ -58,6 +58,7 @@ HlpAboutEmulations=html\about\emulations.html HlpAboutHistory=html\about\history.html HlpAboutQanda=html\about\qanda.html +HlpAboutQandaConnection=html\about\qanda.html#connection HlpAboutRequests=html\about\requests.html HlpAboutContacts=html\about\contacts.html HlpAboutJargons=html\about\jargons.html Modified: trunk/teraterm/common/helpid.h =================================================================== --- trunk/teraterm/common/helpid.h 2023-07-23 07:07:41 UTC (rev 10806) +++ trunk/teraterm/common/helpid.h 2023-07-23 14:23:26 UTC (rev 10807) @@ -83,6 +83,8 @@ #define HlpAboutDifference 20012 #define HlpAboutForeword 20013 +#define HlpAboutQandaConnection 20101 + #define HlpUsageKeyboard 30100 #define HlpUsageMouse 30200 #define HlpUsageShortcut 30300 Modified: trunk/teraterm/teraterm/commlib.c =================================================================== --- trunk/teraterm/teraterm/commlib.c 2023-07-23 07:07:41 UTC (rev 10806) +++ trunk/teraterm/teraterm/commlib.c 2023-07-23 14:23:26 UTC (rev 10807) @@ -29,11 +29,15 @@ /* IPv6 modification is Copyright (C) 2000, 2001 Jun-ya KATO <kato****@win6*****> */ /* TERATERM.EXE, Communication routines */ +#include <winsock2.h> +#include <ws2tcpip.h> +#include <stdio.h> /* for _snprintf() */ +#include <time.h> +#include <process.h> + #include "teraterm.h" #include "tttypes.h" #include "tt_res.h" -#include <process.h> - #include "ttcommon.h" #include "ttwsk.h" #include "ttlib.h" @@ -40,16 +44,12 @@ #include "ttfileio.h" #include "ttplug.h" /* TTPLUG */ #include "ttdde.h" - #include "commlib.h" -#include <winsock2.h> -#include <ws2tcpip.h> -#include <stdio.h> /* for _snprintf() */ -#include <time.h> - #include "filesys_log.h" #include "ttlib.h" #include "codeconv.h" +#include "helpid.h" +#include "vtwin.h" static SOCKET OpenSocket(PComVar); static void AsyncConnect(PComVar); @@ -414,8 +414,9 @@ "Tera Term", "MSG_TT_ERROR", L"Tera Term: Error", "MSG_INVALID_HOST_ERROR", L"Invalid host", - MB_TASKMODAL | MB_ICONEXCLAMATION + MB_TASKMODAL | MB_ICONEXCLAMATION | MB_HELP }; + VtwinSetHelpId(HlpAboutQandaConnection); TTMessageBoxW(cv->HWin, &info, ts->UILanguageFileW); } goto BreakSC; Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2023-07-23 07:07:41 UTC (rev 10806) +++ trunk/teraterm/teraterm/vtwin.cpp 2023-07-23 14:23:26 UTC (rev 10807) @@ -141,6 +141,7 @@ typedef struct { char dbcs_lead_byte; UINT monitor_DPI; // \x83E\x83B\x83\x93\x83h\x83E\x82\xAA\x95\\x8E\xA6\x82\xB3\x82\xEA\x82Ă\xA2\x82\xE9\x83f\x83B\x83X\x83v\x83\x8C\x83C\x82\xCCDPI + DWORD help_data; } vtwin_work_t; static vtwin_work_t vtwin_work; @@ -5326,6 +5327,11 @@ } break; } + case WM_HELP: { + vtwin_work_t *w = &vtwin_work; + OpenHelpCV(&cv, HH_HELP_CONTEXT, w->help_data); + break; + } default: retval = DefWindowProc(msg, wp, lp); break; @@ -5332,3 +5338,16 @@ } return retval; } + +/** + * WM_HELP \x83\x81\x83b\x83Z\x81[\x83W\x82\xF0\x8E\xF3\x90M\x82\xB5\x82\xBD\x82Ƃ\xAB\x95\\x8E\xA6\x82\xB7\x82\xE9\x83w\x83\x8B\x83v\x82̃w\x83\x8B\x83vID\x82\xF0\x90ݒ肷\x82\xE9 + * + * MessageBox() \x82\xCC uType \x82\xC9 MB_HELP \x82\xF0\x90ݒ肷\x82\xE9\x82\xC6 + * \x95\\x8E\xA6\x82\xB3\x82\xEA\x82\xE9HELP\x83{\x83^\x83\x93\x82\xF0\x89\x9F\x82\xB5\x82\xBD\x82Ƃ\xAB\x82\xC9 + * WM_HELP \x82\xAA\x90e\x83E\x83B\x83\x93\x83h\x83E\x82ɑ\x97\x82\xE7\x82\xEA\x82\xE9 + */ +void VtwinSetHelpId(DWORD data) +{ + vtwin_work_t *w = &vtwin_work; + w->help_data = data; +} Modified: trunk/teraterm/teraterm/vtwin.h =================================================================== --- trunk/teraterm/teraterm/vtwin.h 2023-07-23 07:07:41 UTC (rev 10806) +++ trunk/teraterm/teraterm/vtwin.h 2023-07-23 14:23:26 UTC (rev 10807) @@ -241,3 +241,13 @@ void SetColor(); }; #endif + +#ifdef __cplusplus +extern "C" { +#endif + +void VtwinSetHelpId(DWORD data); + +#ifdef __cplusplus +} +#endif