Revision: 8017 https://osdn.net/projects/ttssh2/scm/svn/commits/8017 Author: zmatsuo Date: 2019-08-25 01:13:55 +0900 (Sun, 25 Aug 2019) Log Message: ----------- Additional settings ダイアログにヘルプボタンを追加 Modified Paths: -------------- trunk/doc/en/html/about/history.html trunk/doc/ja/html/about/history.html trunk/teraterm/common/tmfc.cpp trunk/teraterm/common/tmfc.h trunk/teraterm/teraterm/addsetting.cpp trunk/teraterm/teraterm/addsetting.h trunk/teraterm/teraterm/vtwin.cpp -------------- next part -------------- Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2019-08-24 14:46:39 UTC (rev 8016) +++ trunk/doc/en/html/about/history.html 2019-08-24 16:13:55 UTC (rev 8017) @@ -40,6 +40,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>The <a href="../setup/teraterm-win.html#textselect">Disabling text selection when the window is activated by mouse</a> configuration can be set up on the <a href="../menu/setup-additional.html#SelectOnActivate">Additional settings dialog</a>.</li> + <li>Add help buton in Additional settings dialog.</li> </ul> </li> <li>Bug fixes Modified: trunk/doc/ja/html/about/history.html =================================================================== --- trunk/doc/ja/html/about/history.html 2019-08-24 14:46:39 UTC (rev 8016) +++ trunk/doc/ja/html/about/history.html 2019-08-24 16:13:55 UTC (rev 8017) @@ -40,6 +40,7 @@ <li><a href="../menu/file-chdir.html">\x83t\x83@\x83C\x83\x8B\x93]\x91\x97\x82̂\xBD\x82߂̃f\x83B\x83\x8C\x83N\x83g\x83\x8A</a>\x82Ɋ܂܂\xEA\x82\xE9\x8A\xAB\x95ϐ\x94\x82\xF0\x93W\x8AJ\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li> <li>IME\x82̖\xA2\x8Am\x92蕶\x8E\x9A\x82̃t\x83H\x83\x93\x83g\x82\xAA\x8Ew\x92\xE8\x83t\x83H\x83\x93\x83g\x82Ɠ\xAF\x88\xEA\x82ɂȂ\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li> <li><a href="../setup/teraterm-win.html#textselect">\x83}\x83E\x83X\x82ŃE\x83B\x83\x93\x83h\x83E\x82\xF0\x91I\x91\xF0\x82\xB5\x82\xBD\x82Ƃ\xAB\x82̕\xB6\x8E\x9A\x82̑I\x91\xF0\x82\xF0\x8B֎~\x82\xB7\x82\xE9</a>\x82\xF0<a href="../menu/setup-additional.html#SelectOnActivate">Additional settings\x83_\x83C\x83A\x83\x8D\x83O</a>\x82Őݒ\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li> + <li>Additional settings\x83_\x83C\x83A\x83\x8D\x83O\x82Ƀw\x83\x8B\x83v\x83{\x83^\x83\x93\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li> </ul> </li> <li>\x83o\x83O\x8FC\x90\xB3 Modified: trunk/teraterm/common/tmfc.cpp =================================================================== --- trunk/teraterm/common/tmfc.cpp 2019-08-24 14:46:39 UTC (rev 8016) +++ trunk/teraterm/common/tmfc.cpp 2019-08-24 16:13:55 UTC (rev 8017) @@ -674,6 +674,10 @@ return (HBRUSH)::DefWindowProc(m_hWnd, WM_CTLCOLORSTATIC, (WPARAM)hDC, (LPARAM)hWnd); } +void TTCPropertyPage::OnHelp() +{ +} + UINT CALLBACK TTCPropertyPage::PropSheetPageProc(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp) { return 0; @@ -698,6 +702,9 @@ case PSN_APPLY: self->OnOK(); break; + case PSN_HELP: + self->OnHelp(); + break; default: break; } Modified: trunk/teraterm/common/tmfc.h =================================================================== --- trunk/teraterm/common/tmfc.h 2019-08-24 14:46:39 UTC (rev 8016) +++ trunk/teraterm/common/tmfc.h 2019-08-24 16:13:55 UTC (rev 8017) @@ -178,6 +178,7 @@ virtual void OnOK(); virtual BOOL OnCommand(WPARAM wp, LPARAM lp); virtual HBRUSH OnCtlColor(HDC hDC, HWND hWnd); + virtual void OnHelp(); HPROPSHEETPAGE CreatePropertySheetPage(); protected: PROPSHEETPAGE_V1 m_psp; Modified: trunk/teraterm/teraterm/addsetting.cpp =================================================================== --- trunk/teraterm/teraterm/addsetting.cpp 2019-08-24 14:46:39 UTC (rev 8016) +++ trunk/teraterm/teraterm/addsetting.cpp 2019-08-24 16:13:55 UTC (rev 8017) @@ -46,6 +46,7 @@ #include "ttftypes.h" #include "dlglib.h" #include "compat_win.h" +#include "helpid.h" #include "addsetting.h" #ifdef _DEBUG @@ -92,7 +93,7 @@ get_lang_msgT("DLG_TABSHEET_TITLE_GENERAL", UIMsg, _countof(UIMsg), _T("General"), ts.UILanguageFile); m_psp.pszTitle = _tcsdup(UIMsg); - m_psp.dwFlags |= PSP_USETITLE; + m_psp.dwFlags |= (PSP_USETITLE | PSP_HASHELP); } CGeneralPropPageDlg::~CGeneralPropPageDlg() @@ -206,6 +207,11 @@ ts.TitleFormat |= (GetCheck(IDC_TITLEFMT_DISPSERIALSPEED) == BST_CHECKED) << 5; } +void CGeneralPropPageDlg::OnHelp() +{ + PostMessage(HVTWin, WM_USER_DLGHELP2, HlpMenuSetupAdditional, 0); +} + // CSequencePropPageDlg \x83_\x83C\x83A\x83\x8D\x83O CSequencePropPageDlg::CSequencePropPageDlg(HINSTANCE inst, TTCPropertySheet *sheet) @@ -215,7 +221,7 @@ get_lang_msgT("DLG_TABSHEET_TITLE_SEQUENCE", UIMsg, _countof(UIMsg), _T("Control Sequence"), ts.UILanguageFile); m_psp.pszTitle = _tcsdup(UIMsg); - m_psp.dwFlags |= PSP_USETITLE; + m_psp.dwFlags |= (PSP_USETITLE | PSP_HASHELP); } CSequencePropPageDlg::~CSequencePropPageDlg() @@ -391,6 +397,10 @@ ts.NotifyClipboardAccess = GetCheck(IDC_CLIPBOARD_NOTIFY); } +void CSequencePropPageDlg::OnHelp() +{ + PostMessage(HVTWin, WM_USER_DLGHELP2, HlpMenuSetupAdditional, 0); +} // CCopypastePropPageDlg \x83_\x83C\x83A\x83\x8D\x83O @@ -401,7 +411,7 @@ get_lang_msgT("DLG_TABSHEET_TITLE_COPYPASTE", UIMsg, _countof(UIMsg), _T("Copy and Paste"), ts.UILanguageFile); m_psp.pszTitle = _tcsdup(UIMsg); - m_psp.dwFlags |= PSP_USETITLE; + m_psp.dwFlags |= (PSP_USETITLE | PSP_HASHELP); } CCopypastePropPageDlg::~CCopypastePropPageDlg() @@ -607,6 +617,10 @@ ts.SelOnActive = (GetCheck(IDC_SELECT_ON_ACTIVATE) == BST_CHECKED); } +void CCopypastePropPageDlg::OnHelp() +{ + PostMessage(HVTWin, WM_USER_DLGHELP2, HlpMenuSetupAdditional, 0); +} // CVisualPropPageDlg \x83_\x83C\x83A\x83\x8D\x83O @@ -617,7 +631,7 @@ get_lang_msgT("DLG_TABSHEET_TITLE_VISUAL", UIMsg, _countof(UIMsg), _T("Visual"), ts.UILanguageFile); m_psp.pszTitle = _tcsdup(UIMsg); - m_psp.dwFlags |= PSP_USETITLE; + m_psp.dwFlags |= (PSP_USETITLE | PSP_HASHELP); } CVisualPropPageDlg::~CVisualPropPageDlg() @@ -1043,8 +1057,11 @@ } } +void CVisualPropPageDlg::OnHelp() +{ + PostMessage(HVTWin, WM_USER_DLGHELP2, HlpMenuSetupAdditional, 0); +} - // CLogPropPageDlg \x83_\x83C\x83A\x83\x8D\x83O CLogPropPageDlg::CLogPropPageDlg(HINSTANCE inst, TTCPropertySheet *sheet) @@ -1054,7 +1071,7 @@ get_lang_msgT("DLG_TABSHEET_TITLE_Log", UIMsg, _countof(UIMsg), _T("Log"), ts.UILanguageFile); m_psp.pszTitle = _tcsdup(UIMsg); - m_psp.dwFlags |= PSP_USETITLE; + m_psp.dwFlags |= (PSP_USETITLE | PSP_HASHELP); } CLogPropPageDlg::~CLogPropPageDlg() @@ -1401,6 +1418,11 @@ ts.LogTimestampType = GetCurSel(IDC_OPT_TIMESTAMP_TYPE); } +void CLogPropPageDlg::OnHelp() +{ + PostMessage(HVTWin, WM_USER_DLGHELP2, HlpMenuSetupAdditional, 0); +} + ///////////////////////////// // CCygwinPropPageDlg \x83_\x83C\x83A\x83\x8D\x83O @@ -1412,7 +1434,7 @@ get_lang_msgT("DLG_TABSHEET_TITLE_CYGWIN", UIMsg, _countof(UIMsg), _T("Cygwin"), ts.UILanguageFile); m_psp.pszTitle = _tcsdup(UIMsg); - m_psp.dwFlags |= PSP_USETITLE; + m_psp.dwFlags |= (PSP_USETITLE | PSP_HASHELP); } CCygwinPropPageDlg::~CCygwinPropPageDlg() @@ -1495,6 +1517,11 @@ GetDlgItemTextA(IDC_CYGWIN_PATH, ts.CygwinDirectory, sizeof(ts.CygwinDirectory)); } +void CCygwinPropPageDlg::OnHelp() +{ + PostMessage(HVTWin, WM_USER_DLGHELP2, HlpMenuSetupAdditional, 0); +} + // CAddSettingPropSheetDlg CAddSettingPropSheetDlg::CAddSettingPropSheetDlg( HINSTANCE hInstance, LPCTSTR pszCaption, HWND hParentWnd) : Modified: trunk/teraterm/teraterm/addsetting.h =================================================================== --- trunk/teraterm/teraterm/addsetting.h 2019-08-24 14:46:39 UTC (rev 8016) +++ trunk/teraterm/teraterm/addsetting.h 2019-08-24 16:13:55 UTC (rev 8017) @@ -49,6 +49,7 @@ void OnInitDialog(); void OnOK(); enum { IDD = IDD_TABSHEET_GENERAL }; + void OnHelp(); }; // Control Sequence Page @@ -62,6 +63,7 @@ void OnOK(); enum { IDD = IDD_TABSHEET_SEQUENCE }; BOOL OnCommand(WPARAM wParam, LPARAM lParam); + void OnHelp(); }; // Copypaste Page @@ -75,6 +77,7 @@ void OnOK(); enum { IDD = IDD_TABSHEET_COPYPASTE }; BOOL OnCommand(WPARAM wParam, LPARAM lParam); + void OnHelp(); }; // Visual Page @@ -90,6 +93,7 @@ enum { IDD = IDD_TABSHEET_VISUAL }; BOOL OnCommand(WPARAM wParam, LPARAM lParam); void SetupRGBbox(int index); + void OnHelp(); }; // Log Page @@ -103,6 +107,7 @@ void OnOK(); enum { IDD = IDD_TABSHEET_LOG }; BOOL OnCommand(WPARAM wParam, LPARAM lParam); + void OnHelp(); }; // Cygwin Page @@ -117,6 +122,7 @@ enum { IDD = IDD_TABSHEET_CYGWIN }; cygterm_t settings; BOOL OnCommand(WPARAM wParam, LPARAM lParam); + void OnHelp(); }; // Property Sheet Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2019-08-24 14:46:39 UTC (rev 8016) +++ trunk/teraterm/teraterm/vtwin.cpp 2019-08-24 16:13:55 UTC (rev 8017) @@ -3643,7 +3643,8 @@ LRESULT CVTWindow::OnDlgHelp(WPARAM wParam, LPARAM lParam) { - OpenHelp(HH_HELP_CONTEXT, HelpId, ts.UILanguageFile); + DWORD help_id = (wParam == 0) ? HelpId : wParam; + OpenHelp(HH_HELP_CONTEXT, help_id, ts.UILanguageFile); return 0; }