Revision: 7682 https://osdn.net/projects/ttssh2/scm/svn/commits/7682 Author: zmatsuo Date: 2019-05-15 23:28:32 +0900 (Wed, 15 May 2019) Log Message: ----------- GetDesktopRect()と同じ処理があったので関数を呼ぶようにした Modified Paths: -------------- trunk/teraterm/teraterm/vtdisp.c -------------- next part -------------- Modified: trunk/teraterm/teraterm/vtdisp.c =================================================================== --- trunk/teraterm/teraterm/vtdisp.c 2019-05-15 14:28:19 UTC (rev 7681) +++ trunk/teraterm/teraterm/vtdisp.c 2019-05-15 14:28:32 UTC (rev 7682) @@ -3854,26 +3854,12 @@ void DispGetRootWinSize(int *x, int *y, BOOL inPixels) { - HMODULE mod; - HMONITOR monitor; - MONITORINFO monitorInfo; RECT desktop, win, client; GetWindowRect(HVTWin, &win); GetClientRect(HVTWin, &client); - if (((mod = GetModuleHandle("user32.dll")) != NULL) && - (GetProcAddress(mod,"MonitorFromWindow") != NULL)) { - // \x83}\x83\x8B\x83`\x83\x82\x83j\x83^\x82\xAA\x83T\x83|\x81[\x83g\x82\xB3\x82\xEA\x82Ă\xA2\x82\xE9\x8Fꍇ - monitor = MonitorFromWindow(HVTWin, MONITOR_DEFAULTTONEAREST); - monitorInfo.cbSize = sizeof(MONITORINFO); - GetMonitorInfo(monitor, &monitorInfo); - desktop = monitorInfo.rcWork; - } - else { - // \x83}\x83\x8B\x83`\x83\x82\x83j\x83^\x82\xAA\x83T\x83|\x81[\x83g\x82\xB3\x82\xEA\x82Ă\xA2\x82Ȃ\xA2\x8Fꍇ - SystemParametersInfo(SPI_GETWORKAREA, 0, &desktop, 0); - } + GetDesktopRect(HVTWin, &desktop); if (inPixels) { *x = desktop.right - desktop.left; @@ -3883,8 +3869,6 @@ *x = (desktop.right - desktop.left - (win.right - win.left - client.right)) / FontWidth; *y = (desktop.bottom - desktop.top - (win.bottom - win.top - client.bottom)) / FontHeight; } - - return; } int DispFindClosestColor(int red, int green, int blue)