| 63 | } |
| 64 | |
| 65 | BOOL CSourceDlg::OnInitDialog(CWindow /*wndFocus*/, LPARAM /*lInitParam*/) |
| 66 | { |
| 67 | CenterWindow(GetParent()); |
| 68 | CComboBox combo = GetDlgItem(IDC_TYPE); |
| 69 | combo.AddString(WStr(SourceTypeToString(SourceType::Udp))); |
| 70 | combo.AddString(WStr(SourceTypeToString(SourceType::Tcp))); |
| 71 | combo.AddString(WStr(SourceTypeToString(SourceType::DebugViewAgent))); |
| 72 | |
| 73 | SetDlgItemText(IDC_NAME, WStr(m_name)); |
| 74 | switch (m_sourceType) |
| 75 | { |
| 76 | case SourceType::Udp: combo.SetCurSel(0); break; |
| 77 | case SourceType::Tcp: combo.SetCurSel(1); break; |
| 78 | case SourceType::DebugViewAgent: combo.SetCurSel(2); break; |
| 79 | default: combo.SetCurSel(0); break; |
| 80 | } |
| 81 | SetDlgItemInt(IDC_PORT, m_port); |
| 82 | SetDlgItemText(IDC_IPADDRESS, WStr(m_address)); |
| 83 | UpdateUI(); |
| 84 | |
| 85 | return TRUE; |
| 86 | } |
| 87 | |
| 88 | void CSourceDlg::OnCancel(UINT /*uNotifyCode*/, int nID, CWindow /*wndCtl*/) |
| 89 | { |
nothing calls this directly
no test coverage detected