MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / OnInitDialog

Method OnInitDialog

legacy/D3Launch/NetworkTab.cpp:146–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146BOOL CNetworkTab::OnInitDialog() {
147 CPropertyPage::OnInitDialog();
148
149 // TODO: Add extra initialization here
150 char *internet_connection, *connection_speed;
151
152 internet_connection = os_config_read_string(szSectionName, "NetworkConnection", CONNECTION_DIALUP);
153 if (!stricmp(internet_connection, CONNECTION_DIALUP))
154 ((CButton *)GetDlgItem(IDC_DIALUP))->SetCheck(1);
155 else if (!stricmp(internet_connection, CONNECTION_LAN))
156 ((CButton *)GetDlgItem(IDC_LAN))->SetCheck(1);
157 else {
158 ((CButton *)GetDlgItem(IDC_NONE))->SetCheck(1);
159 EnableSpeedGroup(FALSE);
160 }
161
162 // set up the connect speed radio buttons
163 connection_speed = os_config_read_string(szSectionName, "ConnectionSpeed", CONNECTION_SPEED_56K);
164 if (!stricmp(connection_speed, CONNECTION_SPEED_FAST))
165 ((CButton *)GetDlgItem(IDC_FAST_CONNECTION))->SetCheck(1);
166 else if (!stricmp(connection_speed, CONNECTION_SPEED_CABLE))
167 ((CButton *)GetDlgItem(IDC_CABLE_CONNECTION))->SetCheck(1);
168 else if (!stricmp(connection_speed, CONNECTION_SPEED_SISDN))
169 ((CButton *)GetDlgItem(IDC_SINGLE_ISDN_CONNECTION))->SetCheck(1);
170 else if (!stricmp(connection_speed, CONNECTION_SPEED_56K))
171 ((CButton *)GetDlgItem(IDC_56K_CONNECTION))->SetCheck(1);
172 else if (!stricmp(connection_speed, CONNECTION_SPEED_33K))
173 ((CButton *)GetDlgItem(IDC_33K_CONNECTION))->SetCheck(1);
174 else
175 ((CButton *)GetDlgItem(IDC_28K_CONNECTION))->SetCheck(1);
176
177 return TRUE; // return TRUE unless you set the focus to a control
178 // EXCEPTION: OCX Property Pages should return FALSE
179}
180
181void CNetworkTab::EnableSpeedGroup(bool bEnable) {
182 HWND hwnd;

Callers

nothing calls this directly

Calls 2

os_config_read_stringFunction · 0.85
SetCheckMethod · 0.80

Tested by

no test coverage detected