Rev | Line | |
---|
[275] | 1 | // TreeViewIcon.cpp : main source file for TreeViewIcon.exe |
---|
| 2 | // |
---|
| 3 | |
---|
| 4 | #include "stdafx.h" |
---|
| 5 | |
---|
| 6 | #include <atlframe.h> |
---|
| 7 | #include <atlctrls.h> |
---|
| 8 | #include <atldlgs.h> |
---|
| 9 | |
---|
| 10 | #include "resource.h" |
---|
| 11 | |
---|
| 12 | #include "MainDlg.h" |
---|
| 13 | |
---|
| 14 | CAppModule _Module; |
---|
| 15 | |
---|
| 16 | int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR /*lpstrCmdLine*/, int /*nCmdShow*/) |
---|
| 17 | { |
---|
| 18 | HRESULT hRes = ::CoInitialize(NULL); |
---|
| 19 | // If you are running on NT 4.0 or higher you can use the following call instead to |
---|
| 20 | // make the EXE free threaded. This means that calls come in on a random RPC thread. |
---|
| 21 | // HRESULT hRes = ::CoInitializeEx(NULL, COINIT_MULTITHREADED); |
---|
| 22 | ATLASSERT(SUCCEEDED(hRes)); |
---|
| 23 | |
---|
| 24 | // this resolves ATL window thunking problem when Microsoft Layer for Unicode (MSLU) is used |
---|
| 25 | ::DefWindowProc(NULL, 0, 0, 0L); |
---|
| 26 | |
---|
| 27 | AtlInitCommonControls(ICC_BAR_CLASSES); // add flags to support other controls |
---|
| 28 | |
---|
| 29 | hRes = _Module.Init(NULL, hInstance); |
---|
| 30 | ATLASSERT(SUCCEEDED(hRes)); |
---|
| 31 | |
---|
| 32 | int nRet = 0; |
---|
| 33 | // BLOCK: Run application |
---|
| 34 | { |
---|
| 35 | CMainDlg dlgMain; |
---|
| 36 | nRet = dlgMain.DoModal(); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | _Module.Term(); |
---|
| 40 | ::CoUninitialize(); |
---|
| 41 | |
---|
| 42 | return nRet; |
---|
| 43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.