added some development tools
[windows-sources.git] / developer / VC / WTL80 / Samples / ImageView / ImageView.cpp
blob66d48745525a6ec4fffc49280b9c5f29aa8da9ea
1 // ImageView.cpp : main source file for ImageView.exe
2 //
4 #include "stdafx.h"
6 #if (_WTL_VER < 0x0750)
7 #error ImageView requires WTL version 7.5 or higher
8 #endif
10 #include <atlframe.h>
11 #include <atlctrls.h>
12 #include <atldlgs.h>
14 #define _ATL_USE_CSTRING_FLOAT
15 #include <atlmisc.h>
16 #include <atlscrl.h>
18 #include <atlwince.h>
20 #include "resource.h"
22 #include "ImageViewView.h"
23 #include "ImageViewdlg.h"
24 #include "MainFrm.h"
26 CAppModule _Module;
28 int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow)
31 HRESULT hRes = CMainFrame::ActivatePreviousInstance(hInstance, lpstrCmdLine );
33 if(FAILED(hRes) || S_FALSE == hRes)
35 return hRes;
38 hRes = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
39 ATLASSERT(SUCCEEDED(hRes));
41 AtlInitCommonControls(ICC_DATE_CLASSES);
42 SHInitExtraControls();
44 hRes = _Module.Init(NULL, hInstance);
45 ATLASSERT(SUCCEEDED(hRes));
47 int nRet = CMainFrame::AppRun(lpstrCmdLine, nCmdShow);
49 _Module.Term();
50 ::CoUninitialize();
52 return nRet;