Rev | Line | |
---|
[192] | 1 | //////////////////////////////////////////////////////////// |
---|
| 2 | // Copyright (C) Roman Ryltsov, 2008-2013 |
---|
| 3 | // Created by Roman Ryltsov roman@alax.info |
---|
| 4 | |
---|
| 5 | #include "stdafx.h" |
---|
| 6 | #include "resource.h" |
---|
| 7 | #include "MainDialog.h" |
---|
| 8 | |
---|
| 9 | //////////////////////////////////////////////////////////// |
---|
| 10 | // CModule |
---|
| 11 | |
---|
| 12 | class CModule : |
---|
| 13 | public CAtlExeModuleT<CModule>, |
---|
| 14 | public CWtlExeModuleT<CModule> |
---|
| 15 | { |
---|
| 16 | typedef CWtlExeModuleT<CModule> CWtlExeModule; |
---|
| 17 | |
---|
| 18 | public: |
---|
| 19 | // CModule |
---|
| 20 | CModule() throw() |
---|
| 21 | { |
---|
| 22 | AtlTraceSetDefaultSettings(); |
---|
| 23 | } |
---|
| 24 | HRESULT PreMessageLoop(INT nShowCommand) throw() |
---|
| 25 | { |
---|
| 26 | _ATLTRY |
---|
| 27 | { |
---|
| 28 | CExceptionFilter::Initialize(); |
---|
| 29 | __C(__super::PreMessageLoop(nShowCommand)); |
---|
| 30 | __E(AtlInitCommonControls(ICC_WIN95_CLASSES | ICC_DATE_CLASSES | ICC_COOL_CLASSES)); |
---|
| 31 | //__C(CWtlExeModule::Initialize()); |
---|
| 32 | } |
---|
| 33 | _ATLCATCH(Exception) |
---|
| 34 | { |
---|
| 35 | _C(Exception); |
---|
| 36 | } |
---|
| 37 | return S_OK; |
---|
| 38 | } |
---|
| 39 | VOID RunMessageLoop() throw() |
---|
| 40 | { |
---|
| 41 | CMainDialog MainDialog; |
---|
| 42 | MainDialog.DoModal(); |
---|
| 43 | } |
---|
| 44 | HRESULT PostMessageLoop() throw() |
---|
| 45 | { |
---|
| 46 | _ATLTRY |
---|
| 47 | { |
---|
| 48 | //CWtlExeModule::Terminate(); |
---|
| 49 | __C(__super::PostMessageLoop()); |
---|
| 50 | CExceptionFilter::Terminate(); |
---|
| 51 | } |
---|
| 52 | _ATLCATCH(Exception) |
---|
| 53 | { |
---|
| 54 | _C(Exception); |
---|
| 55 | } |
---|
| 56 | return S_OK; |
---|
| 57 | } |
---|
| 58 | }; |
---|
| 59 | |
---|
| 60 | //////////////////////////////////////////////////////////// |
---|
| 61 | // Main |
---|
| 62 | |
---|
| 63 | CModule g_Module; |
---|
| 64 | |
---|
| 65 | int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR pszCommandLine, int nShowCommand) |
---|
| 66 | { |
---|
| 67 | return g_Module.WinMain(nShowCommand); |
---|
| 68 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.