Revision: 9950 https://osdn.net/projects/ttssh2/scm/svn/commits/9950 Author: zmatsuo Date: 2022-05-24 00:12:09 +0900 (Tue, 24 May 2022) Log Message: ----------- 高DPI対応 - WM_DPICHANGED メッセージをハンドルしていなかった - r9938 Revision Links: -------------- https://osdn.net/projects/ttssh2/scm/svn/commits/9938 Modified Paths: -------------- branches/adjust_icon/teraterm/ttpmacro/ttmmain.cpp branches/adjust_icon/teraterm/ttpmacro/ttmmain.h -------------- next part -------------- Modified: branches/adjust_icon/teraterm/ttpmacro/ttmmain.cpp =================================================================== --- branches/adjust_icon/teraterm/ttpmacro/ttmmain.cpp 2022-05-23 13:59:11 UTC (rev 9949) +++ branches/adjust_icon/teraterm/ttpmacro/ttmmain.cpp 2022-05-23 15:12:09 UTC (rev 9950) @@ -684,6 +684,13 @@ return 0; } +LRESULT CCtrlWindow::OnDpiChanged(WPARAM wp, LPARAM) +{ + const UINT new_dpi = LOWORD(wp); + TTSetIcon(m_hInst, m_hWnd, MAKEINTRESOURCEW(IDI_TTMACRO), new_dpi); + return TRUE; +} + LRESULT CCtrlWindow::DlgProc(UINT msg, WPARAM wp, LPARAM lp) { switch(msg) @@ -722,6 +729,9 @@ case WM_USER_DDEEND: OnDdeEnd(wp, lp); break; + case WM_DPICHANGED: + OnDpiChanged(wp, lp); + break; } return FALSE; } Modified: branches/adjust_icon/teraterm/ttpmacro/ttmmain.h =================================================================== --- branches/adjust_icon/teraterm/ttpmacro/ttmmain.h 2022-05-23 13:59:11 UTC (rev 9949) +++ branches/adjust_icon/teraterm/ttpmacro/ttmmain.h 2022-05-23 15:12:09 UTC (rev 9950) @@ -74,5 +74,5 @@ LRESULT OnDdeReady(WPARAM wParam, LPARAM lParam); LRESULT OnDdeEnd(WPARAM wParam, LPARAM lParam); LRESULT OnMacroBringup(WPARAM wParam, LPARAM lParam); + LRESULT OnDpiChanged(WPARAM wp, LPARAM lp); }; -