• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision10279 (tree)
Time2022-09-20 23:57:58
Authorzmatsuo

Log Message

GetDlgItemTextA() を GetDlgItemInt() へ置きかえた

Change Summary

Incremental Difference

--- trunk/teraterm/teraterm/addsetting.cpp (revision 10278)
+++ trunk/teraterm/teraterm/addsetting.cpp (revision 10279)
@@ -474,8 +474,6 @@
474474 SetDlgItemTextA(IDC_DELIM_LIST, ts.DelimList);
475475
476476 // (9)PasteDelayPerLine
477- char buf[64];
478- _snprintf_s(buf, sizeof(buf), "%d", ts.PasteDelayPerLine);
479477 SetDlgItemNum(IDC_PASTEDELAY_EDIT, ts.PasteDelayPerLine);
480478
481479 // (10) SelectOnActivate
@@ -536,7 +534,6 @@
536534
537535 void CCopypastePropPageDlg::OnOK()
538536 {
539- char buf[64];
540537 int val;
541538
542539 // (1)
@@ -590,8 +587,7 @@
590587 GetDlgItemTextA(IDC_DELIM_LIST, ts.DelimList, sizeof(ts.DelimList));
591588
592589 // (9)
593- GetDlgItemTextA(IDC_PASTEDELAY_EDIT, buf, sizeof(buf));
594- val = atoi(buf);
590+ val = GetDlgItemInt(IDC_PASTEDELAY_EDIT);
595591 ts.PasteDelayPerLine =
596592 (val < 0) ? 0 :
597593 (val > 5000) ? 5000 : val;
@@ -1018,18 +1014,9 @@
10181014 HBRUSH CVisualPropPageDlg::OnCtlColor(HDC hDC, HWND hWnd)
10191015 {
10201016 if ( hWnd == GetDlgItem(IDC_SAMPLE_COLOR) ) {
1021- BYTE r, g, b;
1022- char buf[8];
1023-
1024- GetDlgItemTextA(IDC_COLOR_RED, buf, sizeof(buf));
1025- r = atoi(buf);
1026-
1027- GetDlgItemTextA(IDC_COLOR_GREEN, buf, sizeof(buf));
1028- g = atoi(buf);
1029-
1030- GetDlgItemTextA(IDC_COLOR_BLUE, buf, sizeof(buf));
1031- b = atoi(buf);
1032-
1017+ BYTE r = (BYTE)GetDlgItemInt(IDC_COLOR_RED);
1018+ BYTE g = (BYTE)GetDlgItemInt(IDC_COLOR_GREEN);
1019+ BYTE b = (BYTE)GetDlgItemInt(IDC_COLOR_BLUE);
10331020 SetBkMode(hDC, TRANSPARENT);
10341021 SetTextColor(hDC, RGB(r, g, b) );
10351022
@@ -1041,24 +1028,18 @@
10411028 void CVisualPropPageDlg::OnOK()
10421029 {
10431030 int sel;
1044- char buf[MAXPATHLEN];
10451031 int flag_changed = 0;
1032+ int i;
10461033
10471034 // (1)
1048- GetDlgItemTextA(IDC_ALPHA_BLEND_ACTIVE, buf, sizeof(buf));
1049- if (isdigit(buf[0])) {
1050- int i = atoi(buf);
1051- ts.AlphaBlendActive =
1052- (i < 0) ? 0 :
1053- (i > 255) ? 255 : i;
1054- }
1055- GetDlgItemTextA(IDC_ALPHA_BLEND_INACTIVE, buf, sizeof(buf));
1056- if (isdigit(buf[0])) {
1057- int i = atoi(buf);
1058- ts.AlphaBlendInactive =
1059- (i < 0) ? 0 :
1060- (i > 255) ? 255 : i;
1061- }
1035+ i = GetDlgItemInt(IDC_ALPHA_BLEND_ACTIVE);
1036+ ts.AlphaBlendActive =
1037+ (i < 0) ? 0 :
1038+ (BYTE)((i > 255) ? 255 : i);
1039+ i = GetDlgItemInt(IDC_ALPHA_BLEND_INACTIVE);
1040+ ts.AlphaBlendInactive =
1041+ (i < 0) ? 0 :
1042+ (BYTE)((i > 255) ? 255 : i);
10621043
10631044 // (2) テーマファイル選択
10641045 {
Show on old repository browser