///////////////////////////////////////////////////////////////// // Demo.cpp - Basic Demonstration of ATL Frame Window Project // // // // There is no wizard for building ATL Frame Windows so my // // approach was to use the ATL Dialog wizard, then modify // // code to get a Frame Window implementation. // // // // Jim Fawcett, CSE775 - Distributed Objects, Spring 2005 // ///////////////////////////////////////////////////////////////// #include "stdafx.h" #include "Demo.h" // CDemo LRESULT CDemo::OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { PAINTSTRUCT ps; HDC hdc = BeginPaint(&ps); RECT rect; GetClientRect(&rect); DrawText(hdc,_T("This is a Frame Window Experiment"),-1,&rect,DT_CENTER | DT_VCENTER | DT_SINGLELINE); EndPaint(&ps); return 0; } LRESULT CDemo::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { ResizeClient(400,200); return 0; } LRESULT CDemo::OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { MessageBox(NULL,_T("left button down"),MB_OK); return 0; }