/////////////////////////////////////////////////////////////// // ATLWindows.cpp - Defines an ATL-based COM server // // // // Jim Fawcett, CSE775 - Distributed Objects, Spring 2005 // /////////////////////////////////////////////////////////////// #include "stdafx.h" #include "resource.h" #include "ATLWindows.h" #include "CompDlg.h" #include "Monitor.h" /* Wizard declared this ATL Module class here, but I need to use the declaration in my Dialog class header, so I've defined a new header, Monitor.h, that just provides this declaration to this file and to the Dialog header. class CATLWindowsModule : public CAtlExeModuleT< CATLWindowsModule > { public : DECLARE_LIBID(LIBID_ATLWindowsLib) DECLARE_REGISTRY_APPID_RESOURCEID(IDR_ATLWINDOWS, "{15AB5703-67E9-455D-A4EF-CAB570FA3778}") }; */ CATLWindowsModule _AtlModule; // extern "C" int WINAPI _tWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPTSTR /*lpCmdLine*/, int nShowCmd) { CCompDlg dlg(&_AtlModule); dlg.DoModal(); return _AtlModule.WinMain(nShowCmd); }