/****************************************************************************** * * Copyright (c) 1998, KL GROUP INC. All Rights Reserved. * http://www.klg.com * * This file is provided for demonstration and educational uses only. * Permission to use, copy, modify and distribute this file for * any purpose and without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all * copies, and that the name of KL Group not be used in advertising * or publicity pertaining to this material without the specific, * prior written permission of an authorized representative of * KL Group. * * KL GROUP MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY * OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE, OR NON-INFRINGEMENT. KL GROUP SHALL NOT BE LIABLE FOR ANY * DAMAGES SUFFERED BY USERS AS A RESULT OF USING, MODIFYING OR * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. * ******************************************************************************/ /* * Implement all the necessary functions for the CChart2D MFC class */ #include "och2dmfc.h" BOOL CChart2D::Create(LPCTSTR lpszCaption, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID) { BOOL bResult(FALSE); if(CWnd::Create(_T(XRT2D), lpszCaption, dwStyle, rect,pParentWnd, nID)) { m_hChart = XrtCreate(); if(m_hChart) { XrtAttachWindow(m_hChart, m_hWnd); bResult = TRUE; } } return(bResult); } #if (_MFC_VER < 0x0300) ////////////////// // Return place to hold original window proc // WNDPROC* CChart2D::GetSuperWndProcAddr() { static WNDPROC NEAR pfnSuper; // place to store // window proc return &pfnSuper; // always return the // same address } #endif IMPLEMENT_DYNAMIC(CChart2D, CWnd)