///////////////////////////////////////////////////////////////////// // MainFrame.cpp - Experiment with ATL Frame Window // // // // Jim Fawcett, CSE775 - Distributed Objects, Spring 2006 // ///////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "FrameExp.h" #include "MainFrame.h" ///////////////////////////////////////////////////////////////////////////// // LRESULT CMainFrame:: 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 CMainFrame:: OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { ResizeClient(400,200); return 0; } LRESULT CMainFrame:: OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { MessageBox(NULL,_T("left button down"),MB_OK); return 0; }