12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- // dui-demo.cpp : main source file
- //
- #include "stdafx.h"
- #include "MainDlg.h"
- #include "LoginDlg.h"
- #include "SouiInit.h"
- #include "CApp.h"
-
- int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int /*nCmdShow*/)
- {
- HRESULT hRes = OleInitialize(NULL);
- SASSERT(SUCCEEDED(hRes));
- int nRet = 0;
- new CApp();
- CApp::getSingletonPtr()->Init();
- CSouiLoader Loader(hInstance);
- InitSystemRes(Loader.GetApp(), Loader.GetComMgr());
- InitUserRes(Loader.GetApp(), Loader.GetComMgr());
- new SNotifyCenter();
- nRet = Run<CLoginDlg>(Loader.GetApp());
- if (CApp::getSingletonPtr()->GetOut() == 1)
- {
- nRet = Run<CMainDlg>(Loader.GetApp());
- }
- delete CApp::getSingletonPtr();
- delete SNotifyCenter::getSingletonPtr();
-
- OleUninitialize();
- return nRet;
- }
|