Assembla home | Assembla project page
 

root/trunk/TimeZoneInformation/TimeZoneInformation.cpp

Revision 19, 1.8 kB (checked in by alax, 1 year ago)

--

  • Property svn:keywords set to Id
Line 
1 ////////////////////////////////////////////////////////////
2 // TimeZoneInformation.cpp : main source file for TimeZoneInformation.exe
3 //
4 // Copyright (C) Alax.Info, 2006-2008
5 // http://alax.info
6 //
7 // A permission to use the source code is granted as long as reference to
8 // source website http://alax.info is retained.
9 //
10 // Created by Roman Ryltsov roman@alax.info
11 //
12 // $Id$
13
14 #include "stdafx.h"
15 #include <atlframe.h>
16 #include <atlctrls.h>
17 #include <atldlgs.h>
18 #include "resource.h"
19 #include "MainDialog.h"
20
21 ////////////////////////////////////////////////////////////
22 // CTimeZoneInformationModule
23
24 [
25         module(
26                 type = exe,
27                 name = "TimeZoneInformationModule",
28                 uuid = "99B9B4DE-9919-42AE-A794-83790F1FF639"
29                 )
30 ]
31 class CTimeZoneInformationModule :
32         //public CAtlExeModuleT<CTimeZoneInformationModule>,
33         public CWtlExeModuleT<CTimeZoneInformationModule>
34 {
35         typedef CWtlExeModuleT<CTimeZoneInformationModule> CWtlExeModule;
36
37 public:
38 // CTimeZoneInformationModule
39
40 // CAtlExeModuleT
41         static HRESULT InitializeCom() throw()
42         {
43                 _C(OleInitialize(NULL));
44                 return S_OK;
45         }
46         static VOID UninitializeCom() throw()
47         {
48                 OleUninitialize();
49         }
50         CTimeZoneInformationModule() throw()
51         {
52         }
53         HRESULT PreMessageLoop(INT nShowCommand) throw()
54         {
55                 _ATLTRY
56                 {
57                         __E(AtlInitCommonControls(ICC_WIN95_CLASSES | ICC_DATE_CLASSES | ICC_COOL_CLASSES));
58                         //__C(CWtlExeModule::Initialize());
59                         __C(__super::PreMessageLoop(nShowCommand));
60                 }
61                 _ATLCATCH(Exception)
62                 {
63                         _C(Exception);
64                 }
65                 return S_OK;
66         }
67         VOID RunMessageLoop() throw()
68         {
69                 CMainDialog MainDialog;
70                 MainDialog.DoModal();
71         }
72         HRESULT PostMessageLoop() throw()
73         {
74                 _ATLTRY
75                 {
76                         _V(__super::PostMessageLoop());
77                         //CWtlExeModule::Terminate();
78                 }
79                 _ATLCATCH(Exception)
80                 {
81                         _C(Exception);
82                 }
83                 return S_OK;
84         }
85 };
Note: See TracBrowser for help on using the browser.