コード整理。処理内容は変化なし。
・コメントの typo fix
・インデント調整
・#if 0 でコメントアウトされたコードブロックを削除
・現状に合わないコメントを削除
@@ -5364,7 +5364,6 @@ | ||
5364 | 5364 | return TRUE; |
5365 | 5365 | } |
5366 | 5366 | |
5367 | - | |
5368 | 5367 | // |
5369 | 5368 | // 現在読み込まれている teraterm.ini ファイルが格納されている |
5370 | 5369 | // フォルダをエクスプローラで開く。 |
@@ -5380,7 +5379,6 @@ | ||
5380 | 5379 | |
5381 | 5380 | } |
5382 | 5381 | |
5383 | - | |
5384 | 5382 | void CVTWindow::OnSetupLoadKeyMap() |
5385 | 5383 | { |
5386 | 5384 | BOOL Ok; |
@@ -5480,9 +5478,6 @@ | ||
5480 | 5478 | SendDlgItemMessage(Dialog, IDC_COMMAND_EDIT, CB_SETCURSEL,0,0); |
5481 | 5479 | } |
5482 | 5480 | |
5483 | - | |
5484 | - | |
5485 | - | |
5486 | 5481 | // ドロップダウンの中のエディットコントロールを |
5487 | 5482 | // サブクラス化するためのウインドウプロシージャ |
5488 | 5483 | static WNDPROC OrigBroadcastEditProc; // Original window procedure |
@@ -5526,16 +5521,7 @@ | ||
5526 | 5521 | SetWindowText(dlg, ""); |
5527 | 5522 | SendMessage(dlg, EM_SETSEL, 0, 0); |
5528 | 5523 | } |
5529 | -#if 0 | |
5530 | - for (i = 0 ; i < MAXNWIN ; i++) { // 50 = MAXNWIN(@ ttcmn.c) | |
5531 | - hd = GetNthWin(i); | |
5532 | - if (hd == NULL) | |
5533 | - break; | |
5534 | 5524 | |
5535 | - PostMessage(hd, msg, wParam, lParam); | |
5536 | - //PostMessage(hd, WM_SETFOCUS, NULL, 0); | |
5537 | - } | |
5538 | -#else | |
5539 | 5525 | count = SendMessage(BroadcastWindowList, LB_GETCOUNT, 0, 0); |
5540 | 5526 | for (i = 0 ; i < count ; i++) { |
5541 | 5527 | if (SendMessage(BroadcastWindowList, LB_GETSEL, i, 0)) { |
@@ -5545,21 +5531,11 @@ | ||
5545 | 5531 | } |
5546 | 5532 | } |
5547 | 5533 | } |
5548 | -#endif | |
5549 | 5534 | } |
5550 | 5535 | break; |
5551 | 5536 | |
5552 | 5537 | case WM_CHAR: |
5553 | -#if 0 | |
5554 | - switch (wParam) { | |
5555 | - case VK_RETURN: | |
5556 | - case VK_ESCAPE: | |
5557 | - // 警告音が出ないようにする | |
5558 | - return FALSE; | |
5559 | - } | |
5560 | - // not break; | |
5561 | -#endif | |
5562 | - // 入力した文字ががIDC_COMMAND_EDITに残らないように捨てる | |
5538 | + // 入力した文字がIDC_COMMAND_EDITに残らないように捨てる | |
5563 | 5539 | return FALSE; |
5564 | 5540 | |
5565 | 5541 | default: |
@@ -5575,7 +5551,7 @@ | ||
5575 | 5551 | int i; |
5576 | 5552 | HWND hd; |
5577 | 5553 | |
5578 | - for (i = 0 ; i < MAXNWIN ; i++) { // 50 = MAXNWIN(@ ttcmn.c) | |
5554 | + for (i = 0 ; i < MAXNWIN ; i++) { | |
5579 | 5555 | hd = GetNthWin(i); |
5580 | 5556 | if (hd == NULL) { |
5581 | 5557 | break; |
@@ -5584,7 +5560,6 @@ | ||
5584 | 5560 | return (i); |
5585 | 5561 | } |
5586 | 5562 | |
5587 | - | |
5588 | 5563 | static void UpdateBroadcastWindowList(HWND hWnd) |
5589 | 5564 | { |
5590 | 5565 | int i; |
@@ -5593,7 +5568,7 @@ | ||
5593 | 5568 | |
5594 | 5569 | SendMessage(hWnd, LB_RESETCONTENT, 0, 0); |
5595 | 5570 | |
5596 | - for (i = 0 ; i < MAXNWIN ; i++) { // 50 = MAXNWIN(@ ttcmn.c) | |
5571 | + for (i = 0 ; i < MAXNWIN ; i++) { | |
5597 | 5572 | hd = GetNthWin(i); |
5598 | 5573 | if (hd == NULL) { |
5599 | 5574 | break; |
@@ -5602,12 +5577,6 @@ | ||
5602 | 5577 | GetWindowText(hd, szWindowText, 256); |
5603 | 5578 | SendMessage(hWnd, LB_INSERTSTRING, -1, (LPARAM)szWindowText); |
5604 | 5579 | } |
5605 | - | |
5606 | -#if 0 | |
5607 | - for (i = 0 ; i < SendMessage(BroadcastWindowList, LB_GETCOUNT, 0, 0) ; i++) { | |
5608 | - SendMessage(hWnd, LB_SETSEL, TRUE, i); | |
5609 | - } | |
5610 | -#endif | |
5611 | 5580 | } |
5612 | 5581 | |
5613 | 5582 | /* |
@@ -5652,10 +5621,8 @@ | ||
5652 | 5621 | // (2006.2.7 yutaka) |
5653 | 5622 | PostMessage(hd, WM_SETFOCUS, NULL, 0); |
5654 | 5623 | } |
5655 | - | |
5656 | 5624 | } |
5657 | 5625 | |
5658 | - | |
5659 | 5626 | /* |
5660 | 5627 | * 任意のTeraTerm群へメッセージを送信するマルチキャストモード。厳密には、 |
5661 | 5628 | * ブロードキャスト送信を行い、受信側でメッセージを取捨選択する。 |
@@ -5690,7 +5657,7 @@ | ||
5690 | 5657 | memcpy(msg + nlen, buf, buflen); |
5691 | 5658 | |
5692 | 5659 | // すべてのTera Termにメッセージとデータを送る |
5693 | - for (i = 0 ; i < MAXNWIN ; i++) { // 50 = MAXNWIN(@ ttcmn.c) | |
5660 | + for (i = 0 ; i < MAXNWIN ; i++) { | |
5694 | 5661 | hd = GetNthWin(i); |
5695 | 5662 | if (hd == NULL) { |
5696 | 5663 | break; |
@@ -5714,7 +5681,6 @@ | ||
5714 | 5681 | free(msg); |
5715 | 5682 | } |
5716 | 5683 | |
5717 | - | |
5718 | 5684 | extern "C" |
5719 | 5685 | void SetMulticastName(char *name) |
5720 | 5686 | { |
@@ -5841,15 +5807,15 @@ | ||
5841 | 5807 | init_height = rc_dlg.bottom - rc_dlg.top; |
5842 | 5808 | |
5843 | 5809 | // 現在サイズから必要な値を計算 |
5844 | - GetClientRect(hWnd, &rc_dlg); | |
5810 | + GetClientRect(hWnd, &rc_dlg); | |
5845 | 5811 | p.x = rc_dlg.right; |
5846 | 5812 | p.y = rc_dlg.bottom; |
5847 | 5813 | ClientToScreen(hWnd, &p); |
5848 | 5814 | |
5849 | - GetWindowRect(GetDlgItem(hWnd, IDOK), &rc_ok); | |
5815 | + GetWindowRect(GetDlgItem(hWnd, IDOK), &rc_ok); | |
5850 | 5816 | ok2right = p.x - rc_ok.left; |
5851 | 5817 | |
5852 | - GetWindowRect(GetDlgItem(hWnd, IDCANCEL), &rc); | |
5818 | + GetWindowRect(GetDlgItem(hWnd, IDCANCEL), &rc); | |
5853 | 5819 | cancel2right = p.x - rc.left; |
5854 | 5820 | |
5855 | 5821 | GetWindowRect(GetDlgItem(hWnd, IDC_COMMAND_EDIT), &rc); |
@@ -5944,7 +5910,7 @@ | ||
5944 | 5910 | GetDefaultFName(ts.HomeDir, BROADCAST_LOGFILE, historyfile, sizeof(historyfile)); |
5945 | 5911 | if (LoadTTSET()) { |
5946 | 5912 | (*AddValueToList)(historyfile, buf, "BroadcastCommands", "Command", |
5947 | - ts.MaxBroadcatHistory); | |
5913 | + ts.MaxBroadcatHistory); | |
5948 | 5914 | FreeTTSET(); |
5949 | 5915 | } |
5950 | 5916 | ApplyBroadCastCommandHisotry(hWnd, historyfile); |
@@ -6046,7 +6012,7 @@ | ||
6046 | 6012 | POINT p; |
6047 | 6013 | |
6048 | 6014 | // 新しいダイアログのサイズを得る |
6049 | - GetClientRect(hWnd, &rc_dlg); | |
6015 | + GetClientRect(hWnd, &rc_dlg); | |
6050 | 6016 | dlg_w = rc_dlg.right; |
6051 | 6017 | dlg_h = rc_dlg.bottom; |
6052 | 6018 |
@@ -6056,8 +6022,8 @@ | ||
6056 | 6022 | p.y = rc.top; |
6057 | 6023 | ScreenToClient(hWnd, &p); |
6058 | 6024 | SetWindowPos(GetDlgItem(hWnd, IDOK), 0, |
6059 | - dlg_w - ok2right, p.y, 0, 0, | |
6060 | - SWP_NOSIZE | SWP_NOZORDER); | |
6025 | + dlg_w - ok2right, p.y, 0, 0, | |
6026 | + SWP_NOSIZE | SWP_NOZORDER); | |
6061 | 6027 | |
6062 | 6028 | // Cancel button |
6063 | 6029 | GetWindowRect(GetDlgItem(hWnd, IDCANCEL), &rc); |
@@ -6065,8 +6031,8 @@ | ||
6065 | 6031 | p.y = rc.top; |
6066 | 6032 | ScreenToClient(hWnd, &p); |
6067 | 6033 | SetWindowPos(GetDlgItem(hWnd, IDCANCEL), 0, |
6068 | - dlg_w - cancel2right, p.y, 0, 0, | |
6069 | - SWP_NOSIZE | SWP_NOZORDER); | |
6034 | + dlg_w - cancel2right, p.y, 0, 0, | |
6035 | + SWP_NOSIZE | SWP_NOZORDER); | |
6070 | 6036 | |
6071 | 6037 | // Command Edit box |
6072 | 6038 | GetWindowRect(GetDlgItem(hWnd, IDC_COMMAND_EDIT), &rc); |
@@ -6074,8 +6040,8 @@ | ||
6074 | 6040 | p.y = rc.top; |
6075 | 6041 | ScreenToClient(hWnd, &p); |
6076 | 6042 | SetWindowPos(GetDlgItem(hWnd, IDC_COMMAND_EDIT), 0, |
6077 | - 0, 0, dlg_w - p.x - ok2right - cmdlist2ok, p.y, | |
6078 | - SWP_NOMOVE | SWP_NOZORDER); | |
6043 | + 0, 0, dlg_w - p.x - ok2right - cmdlist2ok, p.y, | |
6044 | + SWP_NOMOVE | SWP_NOZORDER); | |
6079 | 6045 | |
6080 | 6046 | // List Edit box |
6081 | 6047 | GetWindowRect(GetDlgItem(hWnd, IDC_LIST), &rc); |
@@ -6083,8 +6049,8 @@ | ||
6083 | 6049 | p.y = rc.top; |
6084 | 6050 | ScreenToClient(hWnd, &p); |
6085 | 6051 | SetWindowPos(GetDlgItem(hWnd, IDC_LIST), 0, |
6086 | - 0, 0, dlg_w - p.x - list2right , dlg_h - p.y - list2bottom, | |
6087 | - SWP_NOMOVE | SWP_NOZORDER); | |
6052 | + 0, 0, dlg_w - p.x - list2right , dlg_h - p.y - list2bottom, | |
6053 | + SWP_NOMOVE | SWP_NOZORDER); | |
6088 | 6054 | |
6089 | 6055 | // status bar |
6090 | 6056 | SendMessage(hStatus , msg , wp , lp); |
@@ -6230,8 +6196,6 @@ | ||
6230 | 6196 | return 1; // 送信できた場合は1を返す |
6231 | 6197 | } |
6232 | 6198 | |
6233 | - | |
6234 | - | |
6235 | 6199 | void CVTWindow::OnControlOpenTEK() |
6236 | 6200 | { |
6237 | 6201 | OpenTEK(); |