MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / OnInitDialog

Method OnInitDialog

DebugView++/SourceDlg.cpp:65–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65BOOL 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
88void CSourceDlg::OnCancel(UINT /*uNotifyCode*/, int nID, CWindow /*wndCtl*/)
89{

Callers

nothing calls this directly

Calls 2

WStrClass · 0.85
SourceTypeToStringFunction · 0.85

Tested by

no test coverage detected