• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Révision10535 (tree)
l'heure2023-01-25 22:53:49
Auteurzmatsuo

Message de Log

シリアル名のプルダウン文字幅をExpandCBWidth()で設定するようにした

Change Summary

Modification

--- trunk/teraterm/ttpdlg/ttdlg.c (revision 10534)
+++ trunk/teraterm/ttpdlg/ttdlg.c (revision 10535)
@@ -1718,6 +1718,7 @@
17181718 GetHNRec->PortType = IdTCPIP;
17191719 DisableDlgItem(Dialog,IDC_HOSTSERIAL,IDC_HOSTSERIAL);
17201720 }
1721+ ExpandCBWidth(Dialog, IDC_HOSTCOM);
17211722
17221723 SetRB(Dialog,GetHNRec->PortType,IDC_HOSTTCPIP,IDC_HOSTSERIAL);
17231724
@@ -1788,29 +1789,6 @@
17881789 break;
17891790 }
17901791
1791- case IDC_HOSTCOM:
1792- if(HIWORD(wParam) == CBN_DROPDOWN) {
1793- HWND hostcom = GetDlgItem(Dialog, IDC_HOSTCOM);
1794- int count = SendMessage(hostcom, CB_GETCOUNT, 0, 0);
1795- int i, len, max_len = 0;
1796- char *lbl;
1797- HDC TmpDC = GetDC(hostcom);
1798- SIZE s;
1799- for (i=0; i<count; i++) {
1800- len = SendMessage(hostcom, CB_GETLBTEXTLEN, i, 0);
1801- lbl = (char *)calloc(len+1, sizeof(char));
1802- SendMessage(hostcom, CB_GETLBTEXT, i, (LPARAM)lbl);
1803- GetTextExtentPoint32(TmpDC, lbl, len, &s);
1804- if (s.cx > max_len) {
1805- max_len = s.cx;
1806- }
1807- free(lbl);
1808- }
1809- SendMessage(hostcom, CB_SETDROPPEDWIDTH,
1810- max_len + GetSystemMetrics(SM_CXVSCROLL), 0);
1811- }
1812- break;
1813-
18141792 case IDC_HOSTHELP:
18151793 PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,HlpFileNewConnection,0);
18161794 break;
Afficher sur ancien navigateur de dépôt.