Develop and Download Open Source Software

Browse Subversion Repository

Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3003 by maya, Mon Aug 20 14:21:57 2007 UTC revision 3004 by maya, Mon Aug 27 08:38:10 2007 UTC
# Line 1189  hostssh_enabled: Line 1189  hostssh_enabled:
1189                          }                          }
1190                          return TRUE;                          return TRUE;
1191    
1192            case IDC_HOSTCOM:
1193                    if(HIWORD(wParam) == CBN_DROPDOWN) {
1194                            HWND hostcom = GetDlgItem(dlg, IDC_HOSTCOM);
1195                            int count = SendMessage(hostcom, CB_GETCOUNT, 0, 0);
1196                            int i, len, max_len = 0;
1197                            char *lbl;
1198                            HDC TmpDC = GetDC(hostcom);
1199                            SIZE s;
1200                            for (i=0; i<count; i++) {
1201                                    len = SendMessage(hostcom, CB_GETLBTEXTLEN, i, 0);
1202                                    lbl = (char *)calloc(len+1, sizeof(char));
1203                                    SendMessage(hostcom, CB_GETLBTEXT, i, (LPARAM)lbl);
1204                                    GetTextExtentPoint32(TmpDC, lbl, len, &s);
1205                                    if (s.cx > max_len)
1206                                            max_len = s.cx;
1207                                    free(lbl);
1208                            }
1209                            SendMessage(hostcom, CB_SETDROPPEDWIDTH,
1210                                        max_len + GetSystemMetrics(SM_CXVSCROLL), 0);
1211                    }
1212                    break;
1213    
1214                  case IDC_HOSTHELP:                  case IDC_HOSTHELP:
1215                          PostMessage(GetParent(dlg), WM_USER_DLGHELP2, 0, 0);                          PostMessage(GetParent(dlg), WM_USER_DLGHELP2, 0, 0);
1216                  }                  }

Legend:
Removed from v.3003  
changed lines
  Added in v.3004

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26