[74] | 1 | //////////////////////////////////////////////////////////// |
---|
[295] | 2 | // Copyright (C) Roman Ryltsov, 2008-2014 |
---|
[74] | 3 | // Created by Roman Ryltsov roman@alax.info |
---|
| 4 | |
---|
| 5 | #include "stdafx.h" |
---|
| 6 | #include "resource.h" |
---|
| 7 | #include "RenderInterlacedVideo_i.h" |
---|
| 8 | #include "MainPropertySheet.h" |
---|
| 9 | |
---|
| 10 | //////////////////////////////////////////////////////////// |
---|
| 11 | // CRenderInterlacedVideoModule |
---|
| 12 | |
---|
| 13 | class CRenderInterlacedVideoModule : |
---|
| 14 | public CAtlExeModuleT<CRenderInterlacedVideoModule>, |
---|
| 15 | public CWtlExeModuleT<CRenderInterlacedVideoModule> |
---|
| 16 | { |
---|
| 17 | public: |
---|
| 18 | |
---|
| 19 | //DECLARE_LIBID(LIBID_AlaxInfoRenderInterlacedVideo) |
---|
| 20 | |
---|
| 21 | //DECLARE_REGISTRY_APPID_RESOURCEID(IDR_MODULE, "{07B79191-7939-462E-8F28-4F02BC0AF1D4}") |
---|
| 22 | |
---|
| 23 | public: |
---|
| 24 | // CRenderInterlacedVideoModule |
---|
[295] | 25 | CRenderInterlacedVideoModule() |
---|
[74] | 26 | { |
---|
[295] | 27 | AtlTraceSetDefaultSettings(); |
---|
[74] | 28 | _W(CExceptionFilter::Initialize()); |
---|
[295] | 29 | _Z4_THIS(); |
---|
[74] | 30 | } |
---|
[295] | 31 | ~CRenderInterlacedVideoModule() |
---|
[74] | 32 | { |
---|
[295] | 33 | _Z4_THIS(); |
---|
[74] | 34 | CExceptionFilter::Terminate(); |
---|
| 35 | } |
---|
[295] | 36 | HRESULT PreMessageLoop(INT nShowCommand) |
---|
[74] | 37 | { |
---|
| 38 | _ATLTRY |
---|
| 39 | { |
---|
| 40 | TraceModuleVersion(); |
---|
| 41 | __E(AtlInitCommonControls(ICC_WIN95_CLASSES | ICC_DATE_CLASSES | ICC_COOL_CLASSES)); |
---|
| 42 | //__C(CWtlExeModule::Initialize()); |
---|
| 43 | __C(__super::PreMessageLoop(nShowCommand)); |
---|
| 44 | } |
---|
| 45 | _ATLCATCH(Exception) |
---|
| 46 | { |
---|
| 47 | _C(Exception); |
---|
| 48 | } |
---|
| 49 | return S_OK; |
---|
| 50 | } |
---|
[295] | 51 | VOID RunMessageLoop() |
---|
[74] | 52 | { |
---|
| 53 | Lock(); |
---|
| 54 | { |
---|
| 55 | CMainPropertySheet MainPropertySheet; |
---|
| 56 | MainPropertySheet.DoModal(); |
---|
| 57 | } |
---|
| 58 | if(GetLockCount() == 1) |
---|
| 59 | { |
---|
| 60 | m_dwTimeOut = 0L; |
---|
| 61 | m_dwPause = 0L; |
---|
| 62 | } |
---|
| 63 | Unlock(); |
---|
| 64 | } |
---|
[295] | 65 | HRESULT PostMessageLoop() |
---|
[74] | 66 | { |
---|
| 67 | _ATLTRY |
---|
| 68 | { |
---|
| 69 | _V(__super::PostMessageLoop()); |
---|
| 70 | //CWtlExeModule::Terminate(); |
---|
| 71 | } |
---|
| 72 | _ATLCATCH(Exception) |
---|
| 73 | { |
---|
| 74 | _C(Exception); |
---|
| 75 | } |
---|
| 76 | return S_OK; |
---|
| 77 | } |
---|
| 78 | }; |
---|
| 79 | |
---|
| 80 | CRenderInterlacedVideoModule _AtlModule; |
---|
| 81 | |
---|
| 82 | //////////////////////////////////////////////////////////// |
---|
| 83 | // Main |
---|
| 84 | |
---|
| 85 | extern "C" int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, INT nShowCommand) |
---|
| 86 | { |
---|
| 87 | return _AtlModule.WinMain(nShowCommand); |
---|
| 88 | } |
---|
| 89 | |
---|