svnno****@sourc*****
svnno****@sourc*****
2013年 8月 25日 (日) 13:14:02 JST
Revision: 5367 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5367 Author: yutakapon Date: 2013-08-25 13:14:02 +0900 (Sun, 25 Aug 2013) Log Message: ----------- SVN#5301 の修正を元に戻す。 Ticket Links: ------------ http://sourceforge.jp/projects/ttssh2/tracker/detail/5301 Modified Paths: -------------- trunk/teraterm/ttpcmn/ttcmn.c -------------- next part -------------- Modified: trunk/teraterm/ttpcmn/ttcmn.c =================================================================== --- trunk/teraterm/ttpcmn/ttcmn.c 2013-08-20 14:46:08 UTC (rev 5366) +++ trunk/teraterm/ttpcmn/ttcmn.c 2013-08-25 04:14:02 UTC (rev 5367) @@ -1147,31 +1147,6 @@ } -// \x83}\x83\x8B\x83`\x83\x82\x83j\x83^\x81[\x82\xF0\x8Dl\x97\xB6\x82\xB5\x82āA\x83^\x83X\x83N\x83o\x81[\x82\xF0\x8F\x9C\x82\xA2\x82\xBD\x83f\x83B\x83X\x83v\x83\x8C\x83C\x83T\x83C\x83Y\x82\xF0\x8E擾\x82\xB7\x82\xE9\x81B -static void get_desktop_size_by_multi_monitor(HWND hwnd, RECT *rect) -{ - HMONITOR hMon; - MONITORINFO mi; - HMODULE mod; - - // Windows95\x82ł͖\xA2\x92\xE8\x8B`\x81B - if (((mod = GetModuleHandle("user32.dll")) != NULL) && - (GetProcAddress(mod,"MonitorFromWindow") != NULL)) { - hMon = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST); - - ZeroMemory( &mi, sizeof( mi )); - mi.cbSize = sizeof( mi ); - GetMonitorInfo(hMon, &mi); - *rect = mi.rcWork; // \x83^\x83X\x83N\x83o\x81[\x82\xF0\x8F\x9C\x82\xA2\x82\xBD\x83f\x83B\x83X\x83v\x83\x8C\x83C\x83T\x83C\x83Y - - } 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, rect, 0); - - } - -} - // \x97L\x8C\xF8\x82ȃE\x83B\x83\x93\x83h\x83E\x82\xF0\x92T\x82\xB5\x81A\x8C\xBB\x8D݈ʒu\x82\xF0\x8BL\x89\xAF\x82\xB3\x82\xB9\x82Ă\xA8\x82\xAD\x81B static void get_valid_window_and_memorize_rect(HWND myhwnd, HWND hwnd[], int *num, int style) { @@ -1215,30 +1190,9 @@ { int n; HWND hwnd[MAXNWIN]; - RECT rc; - int width, i; get_valid_window_and_memorize_rect(myhwnd, hwnd, &n, WIN_SIDEBYSIDE); -#if 0 TileWindows(NULL, MDITILE_VERTICAL, NULL, n, hwnd); -#else - get_desktop_size_by_multi_monitor(myhwnd, &rc); - - if (n <= 0) - return; - - width = (rc.right - rc.left) / n; - for (i = 0 ; i < n ; i++) { - ShowWindow(hwnd[i], SW_RESTORE); - SetWindowPos(hwnd[i], 0, - width*i + rc.left, - rc.top, - width, - rc.bottom - rc.top, - SWP_NOOWNERZORDER | SWP_NOZORDER); - } - SetFocus(hwnd[0]); -#endif } // \x83E\x83B\x83\x93\x83h\x83E\x82\xF0\x8F㉺\x82ɕ\xC0\x82ׂĕ\\x8E\xA6\x82\xB7\x82\xE9(Show Windows Stacked) @@ -1246,30 +1200,9 @@ { int n; HWND hwnd[MAXNWIN]; - RECT rc; - int height, i; get_valid_window_and_memorize_rect(myhwnd, hwnd, &n, WIN_STACKED); -#if 0 TileWindows(NULL, MDITILE_HORIZONTAL, NULL, n, hwnd); -#else - get_desktop_size_by_multi_monitor(myhwnd, &rc); - - if (n <= 0) - return; - - height = (rc.bottom - rc.top) / n; - for (i = 0 ; i < n ; i++) { - ShowWindow(hwnd[i], SW_RESTORE); - SetWindowPos(hwnd[i], 0, - rc.left, - rc.top + height*i, - rc.right - rc.left, - height, - SWP_NOOWNERZORDER | SWP_NOZORDER); - } - SetFocus(hwnd[0]); -#endif } // \x83E\x83B\x83\x93\x83h\x83E\x82\xF0\x8Fd\x82˂ĕ\\x8E\xA6\x82\xB7\x82\xE9(Cascade)