zhipuzi_pos_windows.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #include "pch/pch.h"
  2. #include "wnd/CLoginWnd.h"
  3. #include <curl/curl.h>
  4. int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
  5. _In_opt_ HINSTANCE hPrevInstance,
  6. _In_ LPWSTR lpCmdLine,
  7. _In_ int nCmdShow)
  8. {
  9. //初始化日志
  10. CLewaimaiLog log;
  11. log.Init();
  12. //开始展示窗口
  13. CPaintManagerUI::SetInstance(hInstance);
  14. #ifdef NDEBUG
  15. CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath() + _T("skin"));
  16. CPaintManagerUI::SetResourceZip(_T("skin.zpz"));
  17. #else
  18. CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath() + _T("skin"));
  19. #endif
  20. HRESULT Hr = ::CoInitialize(NULL);
  21. if(FAILED(Hr))
  22. {
  23. return 0;
  24. }
  25. //先显示登录窗口
  26. CLoginWnd* pLogin = new CLoginWnd();
  27. if(pLogin == NULL)
  28. {
  29. return 0;
  30. }
  31. pLogin->Create(NULL, _T("智铺子收银软件登录"), UI_WNDSTYLE_DIALOG, 0, 0, 0, 0, 0, NULL);
  32. pLogin->SetIcon(IDI_ICON_DUILIB);
  33. pLogin->CenterWindow();
  34. pLogin->ShowWindow(true);
  35. CPaintManagerUI::MessageLoop();
  36. ::CoUninitialize();
  37. return 0;
  38. }