#include "pch/pch.h" #include "wnd/CLoginWnd.h" #include "network/CMessagePush.h" int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow) { //初始化日志 CLewaimaiLog log; log.Init(); //读取sqlite里面的设置信息 CSqlite3 sqllite; sqllite.InitConfig(); sqllite.Close(); //由这个对象来处理消息推送的接收,以及消息的处理 CMessagePush push; push.Start(); //开始展示窗口 CPaintManagerUI::SetInstance(hInstance); #if 0 CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath() + _T("skin")); CPaintManagerUI::SetResourceZip(_T("skin.zip")); #else CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath() + _T("skin")); #endif HRESULT Hr = ::CoInitialize(NULL); if(FAILED(Hr)) { return 0; } //先显示登录窗口 CLoginWnd* pLogin = new CLoginWnd(); if(pLogin == NULL) { return 0; } pLogin->Create(NULL, _T("智铺子收银软件登录"), UI_WNDSTYLE_DIALOG, 0, 0, 0, 0, 0, NULL); pLogin->SetIcon(IDI_ICON_DUILIB); pLogin->CenterWindow(); pLogin->ShowModal(); CPaintManagerUI::MessageLoop(); ::CoUninitialize(); return 0; }