///////////////////////////////////////////////////////////////////// // FrameExp.cpp - Experiment with ATL Frame Window // // // // Jim Fawcett, CSE775 - Distributed Objects, Spring 2006 // ///////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "resource.h" //#include #include "FrameExp.h" //#include "FrameExp_i.c" #include "MainFrame.h" CComModule _Module; BEGIN_OBJECT_MAP(ObjectMap) END_OBJECT_MAP() ///////////////////////////////////////////////////////////////////////////// // extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpCmdLine, int nShowCmd) { lpCmdLine = GetCommandLine(); //this line necessary for _ATL_MIN_CRT _Module.Init(ObjectMap, hInstance /*, &LIBID_FRAMEEXPLib*/ ); CMainFrame mainframe; HICON hIcon = LoadIcon(_Module.GetResourceInstance(),MAKEINTRESOURCE(IDI_ICON1)); mainframe.GetWndClassInfo().m_wc.hIcon = hIcon; mainframe.Create(GetDesktopWindow(),CWindow::rcDefault,_T("FrameExp"),0,0/*, NULL */); mainframe.CenterWindow(); mainframe.ShowWindow(nShowCmd); MSG msg; while(GetMessage(&msg,0,0,0)) { TranslateMessage(&msg); DispatchMessage(&msg); } _Module.Term(); return msg.wParam; }