MCPcopy Create free account
hub / github.com/acl-dev/acl / OnInitDialog

Method OnInitDialog

app/net_tools/net_toolsDlg.cpp:162–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160// Cnet_toolsDlg ��Ϣ��������
161
162BOOL Cnet_toolsDlg::OnInitDialog()
163{
164 CDialog::OnInitDialog();
165
166 // ��\������...\���˵������ӵ�ϵͳ�˵��С�
167
168 // IDM_ABOUTBOX ������ϵͳ���Χ�ڡ�
169 ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
170 ASSERT(IDM_ABOUTBOX < 0xF000);
171
172 CMenu* pSysMenu = GetSystemMenu(FALSE);
173 if (pSysMenu != NULL)
174 {
175 CString strAboutMenu;
176 strAboutMenu.LoadString(IDS_ABOUTBOX);
177 if (!strAboutMenu.IsEmpty())
178 {
179 pSysMenu->AppendMenu(MF_SEPARATOR);
180 pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
181 }
182 }
183
184 // ���ô˶Ի����ͼ�ꡣ��Ӧ�ó��������ڲ��ǶԻ���ʱ����ܽ��Զ�
185 // ִ�д˲���
186 SetIcon(m_hIcon, TRUE); // ���ô�ͼ��
187 SetIcon(m_hIcon, FALSE); // ����Сͼ��
188
189 //ShowWindow(SW_MAXIMIZE);
190
191 // TODO: �ڴ����Ӷ���ij�ʼ������
192
193 theApp.m_singleCtrl.Register();
194
195 // ����״̬��
196 int aWidths[3] = {50, 400, -1};
197 m_wndMeterBar.SetParts(3, aWidths);
198
199 m_wndMeterBar.Create(WS_CHILD | WS_VISIBLE | WS_BORDER
200 | CCS_BOTTOM | SBARS_SIZEGRIP,
201 CRect(0,0,0,0), this, 0);
202 m_wndMeterBar.SetText("����", 0, 0);
203 m_wndMeterBar.SetText("", 1, 0);
204 m_wndMeterBar.SetText("", 2, 0);
205
206 // ȡ�ñ�����DNS������
207 std::vector<acl::string> dns_list;
208 if (util::get_dns(dns_list) > 0)
209 {
210 m_dnsIp = dns_list[0];
211 UpdateData(FALSE);
212 }
213
214 const char* path = acl_getcwd();
215 acl::string logpath;
216 logpath.format("%s/net_tools.txt", path);
217 logger_open(logpath.c_str(), "net_tools");
218
219 // �����ݿ��ж�ȡ������

Callers

nothing calls this directly

Calls 12

get_dnsFunction · 0.85
acl_getcwdFunction · 0.85
logger_openFunction · 0.85
IsEmptyMethod · 0.80
SetIconFunction · 0.50
RegisterMethod · 0.45
SetPartsMethod · 0.45
CreateMethod · 0.45
SetTextMethod · 0.45
formatMethod · 0.45
c_strMethod · 0.45
forkMethod · 0.45

Tested by

no test coverage detected