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

Method OnInitDialog

lib_acl_cpp/samples/win_dbservice/win_dbserviceDlg.cpp:177–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175// Cwin_dbserviceDlg ��Ϣ��������
176
177BOOL Cwin_dbserviceDlg::OnInitDialog()
178{
179 CDialog::OnInitDialog();
180
181 // ��\������...\���˵������ӵ�ϵͳ�˵��С�
182
183 // IDM_ABOUTBOX ������ϵͳ���Χ�ڡ�
184 ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
185 ASSERT(IDM_ABOUTBOX < 0xF000);
186
187 CMenu* pSysMenu = GetSystemMenu(FALSE);
188 if (pSysMenu != NULL)
189 {
190 CString strAboutMenu;
191 strAboutMenu.LoadString(IDS_ABOUTBOX);
192 if (!strAboutMenu.IsEmpty())
193 {
194 pSysMenu->AppendMenu(MF_SEPARATOR);
195 pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
196 }
197 }
198
199 // ���ô˶Ի����ͼ�ꡣ��Ӧ�ó��������ڲ��ǶԻ���ʱ����ܽ��Զ�
200 // ִ�д˲���
201 SetIcon(m_hIcon, TRUE); // ���ô�ͼ��
202 SetIcon(m_hIcon, FALSE); // ����Сͼ��
203
204 ShowWindow(SW_MINIMIZE);
205
206 // TODO: �ڴ����Ӷ���ij�ʼ������
207
208 // �� DOS ����
209 AllocConsole();
210 FILE* fp = freopen("CONOUT$","w+t",stdout);
211 // �򿪿�� DOS ����
212 acl::open_dos();
213
214 logger_open("dbservice.log", "dbservice", "all:1");
215 if (create_db() == false)
216 printf(">>create table error\r\n");
217
218 // ���û��� WIN32 ��Ϣģʽ��IPC��ʽ
219 server_ = new acl::db_service_sqlite("DB_TEST", __dbfile, 2, 2, true);
220 if (server_->open(handle_) == false)
221 {
222 printf("open db service failed\r\n");
223 delete server_;
224 server_ = NULL;
225 }
226
227 return TRUE; // ���������˿ؼ��Ľ��㣬���򷵻� TRUE
228}
229
230void Cwin_dbserviceDlg::OnSysCommand(UINT nID, LPARAM lParam)
231{

Callers

nothing calls this directly

Calls 6

open_dosFunction · 0.85
logger_openFunction · 0.85
IsEmptyMethod · 0.80
create_dbFunction · 0.70
SetIconFunction · 0.50
openMethod · 0.45

Tested by

no test coverage detected