Skip to content

Commit

Permalink
ファイル送信ダイアログを改善 #380
Browse files Browse the repository at this point in the history
- 数値を入力するエディットボックスで、入力を数字のみに限定した
- ドロップダウンをソートなしに変更
- ダイアログのボタンの並びを OK Cancel Help に変更
  - 変更前は Help Cancel OK
  • Loading branch information
zmatsuo committed Dec 21, 2024
1 parent 272a336 commit f0ce2cb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
10 changes: 10 additions & 0 deletions teraterm/teraterm/sendfiledlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@ static INT_PTR CALLBACK SendFileDlgProc(HWND hDlgWnd, UINT msg, WPARAM wp, LPARA
free(text);
}

// ドロップダウンのエディットコントロールで数字のみ入力
{
COMBOBOXINFO cbi;
cbi.cbSize = sizeof(COMBOBOXINFO);
HWND hComboBox = GetDlgItem(hDlgWnd, IDC_SENDFILE_SEND_SIZE_DROPDOWN);
GetComboBoxInfo(hComboBox, &cbi);
HWND hEdit = cbi.hwndItem;
SetWindowLongW(hEdit, GWL_STYLE, ES_NUMBER | GetWindowLongW(hEdit, GWL_STYLE));
}

return TRUE;
}
case WM_DESTROY: {
Expand Down
10 changes: 5 additions & 5 deletions teraterm/teraterm/ttermpro.rc
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,14 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,42,124,10
CONTROL "&Binary",IDC_SENDFILE_CHECK_BINARY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,59,72,10
LTEXT "delay type",IDC_SENDFILE_DELAYTYPE_LABEL,9,76,74,11
COMBOBOX IDC_SENDFILE_DELAYTYPE_DROPDOWN,18,90,64,53,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_SENDFILE_DELAYTYPE_DROPDOWN,18,90,64,53,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "send size(bytes)",IDC_SENDFILE_SEND_SIZE_LABEL,9,107,75,8
COMBOBOX IDC_SENDFILE_SEND_SIZE_DROPDOWN,18,121,65,47,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_SENDFILE_SEND_SIZE_DROPDOWN,18,121,65,47,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
LTEXT "delay time(ms)",IDC_SENDFILE_DELAYTIME_LABEL,9,139,75,8
EDITTEXT IDC_SENDFILE_DELAYTIME_EDIT,18,154,40,14,ES_AUTOHSCROLL
PUSHBUTTON "Help",IDHELP,104,179,50,14
EDITTEXT IDC_SENDFILE_DELAYTIME_EDIT,18,154,40,14,ES_AUTOHSCROLL | ES_NUMBER
DEFPUSHBUTTON "OK",IDOK,104,179,50,14
PUSHBUTTON "Cancel",IDCANCEL,160,179,50,14
DEFPUSHBUTTON "OK",IDOK,215,179,50,14
PUSHBUTTON "Help",IDHELP,215,179,50,14
END

IDD_TABSHEET_THEME DIALOGEX 0, 0, 307, 162
Expand Down

0 comments on commit f0ce2cb

Please sign in to comment.