svnno****@sourc*****
svnno****@sourc*****
2009年 10月 3日 (土) 22:08:38 JST
Revision: 3628 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3628 Author: yutakapon Date: 2009-10-03 22:08:37 +0900 (Sat, 03 Oct 2009) Log Message: ----------- Broadcast Commandã®ãã¤ã¢ãã°ããªãµã¤ãºã§ããããã«ããã Modified Paths: -------------- trunk/teraterm/common/tt_res.h trunk/teraterm/teraterm/ttermpro.rc trunk/teraterm/teraterm/vtwin.cpp -------------- next part -------------- Modified: trunk/teraterm/common/tt_res.h =================================================================== --- trunk/teraterm/common/tt_res.h 2009-09-28 13:49:27 UTC (rev 3627) +++ trunk/teraterm/common/tt_res.h 2009-10-03 13:08:37 UTC (rev 3628) @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. -// Used by t:\ttssh2\teraterm\teraterm\ttermpro.rc +// Used by c:\usr\ttssh2\teraterm\teraterm\ttermpro.rc // #define IDI_TTERM 100 #define IDR_ACC 100 Modified: trunk/teraterm/teraterm/ttermpro.rc =================================================================== --- trunk/teraterm/teraterm/ttermpro.rc 2009-09-28 13:49:27 UTC (rev 3627) +++ trunk/teraterm/teraterm/ttermpro.rc 2009-10-03 13:08:37 UTC (rev 3628) @@ -94,7 +94,7 @@ END IDD_BROADCAST_DIALOG DIALOGEX 0, 0, 252, 98 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME CAPTION "Tera Term: Broadcast command" FONT 10, "System", 400, 0, 0x80 BEGIN Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2009-09-28 13:49:27 UTC (rev 3627) +++ trunk/teraterm/teraterm/vtwin.cpp 2009-10-03 13:08:37 UTC (rev 3628) @@ -4522,6 +4522,10 @@ char historyfile[MAX_PATH]; static HWND hwndHostname = NULL; // HOSTNAME dropdown static HWND hwndHostnameEdit = NULL; // Edit control on HOSTNAME dropdown + // for resize + RECT rc_dlg, rc, rc_ok; + POINT p; + static int ok2right, cancel2right, cmdlist2ok, list2bottom, list2right; switch (msg) { case WM_SHOWWINDOW: @@ -4604,6 +4608,25 @@ get_lang_msg("BTN_CLOSE", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile); SetDlgItemText(hWnd, IDCANCEL, ts.UIMsg); + // »ÝTCY©çKvÈlðvZ + GetClientRect(hWnd, &rc_dlg); + p.x = rc_dlg.right; + p.y = rc_dlg.bottom; + ClientToScreen(hWnd, &p); + + GetWindowRect(GetDlgItem(hWnd, IDOK), &rc_ok); + ok2right = p.x - rc_ok.left; + + GetWindowRect(GetDlgItem(hWnd, IDCANCEL), &rc); + cancel2right = p.x - rc.left; + + GetWindowRect(GetDlgItem(hWnd, IDC_COMMAND_EDIT), &rc); + cmdlist2ok = rc_ok.left - rc.right; + + GetWindowRect(GetDlgItem(hWnd, IDC_LIST), &rc); + list2bottom = p.y - rc.bottom; + list2right = p.x - rc.right; + return FALSE; case WM_COMMAND: @@ -4761,6 +4784,57 @@ } return TRUE; + case WM_SIZE: + { + // Äzu + int dlg_w, dlg_h; + RECT rc_dlg; + RECT rc; + POINT p; + + // Vµ¢_CAOÌTCYð¾é + GetClientRect(hWnd, &rc_dlg); + dlg_w = rc_dlg.right; + dlg_h = rc_dlg.bottom; + + // OK button + GetWindowRect(GetDlgItem(hWnd, IDOK), &rc); + p.x = rc.left; + p.y = rc.top; + ScreenToClient(hWnd, &p); + SetWindowPos(GetDlgItem(hWnd, IDOK), 0, + dlg_w - ok2right, p.y, 0, 0, + SWP_NOSIZE | SWP_NOZORDER); + + // Cancel button + GetWindowRect(GetDlgItem(hWnd, IDCANCEL), &rc); + p.x = rc.left; + p.y = rc.top; + ScreenToClient(hWnd, &p); + SetWindowPos(GetDlgItem(hWnd, IDCANCEL), 0, + dlg_w - cancel2right, p.y, 0, 0, + SWP_NOSIZE | SWP_NOZORDER); + + // Command Edit box + GetWindowRect(GetDlgItem(hWnd, IDC_COMMAND_EDIT), &rc); + p.x = rc.left; + p.y = rc.top; + ScreenToClient(hWnd, &p); + SetWindowPos(GetDlgItem(hWnd, IDC_COMMAND_EDIT), 0, + 0, 0, dlg_w - p.x - ok2right - cmdlist2ok, p.y, + SWP_NOMOVE | SWP_NOZORDER); + + // List Edit box + GetWindowRect(GetDlgItem(hWnd, IDC_LIST), &rc); + p.x = rc.left; + p.y = rc.top; + ScreenToClient(hWnd, &p); + SetWindowPos(GetDlgItem(hWnd, IDC_LIST), 0, + 0, 0, dlg_w - p.x - list2right , dlg_h - p.y - list2bottom, + SWP_NOMOVE | SWP_NOZORDER); + } + return TRUE; + default: return FALSE; }