// ShowMschart.cpp : implementation file // #include "stdafx.h" #include "ylgl.h" #include "ShowMschart.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // ShowMschart dialog ShowMschart::ShowMschart(CWnd* pParent /*=NULL*/) : CDialog(ShowMschart::IDD, pParent) { //{{AFX_DATA_INIT(ShowMschart) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void ShowMschart::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(ShowMschart) // NOTE: the ClassWizard will add DDX and DDV calls here //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(ShowMschart, CDialog) //{{AFX_MSG_MAP(ShowMschart) ON_WM_DESTROY() ON_WM_CLOSE() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // ShowMschart message handlers extern HWND g_hShowChartWnd; BOOL ShowMschart::OnInitDialog() { CDialog::OnInitDialog(); g_hShowChartWnd=this->GetSafeHwnd (); // TODO: Add extra initialization here ::SetWindowPos(m_hWnd,HWND_TOP,0 ,0,g_screenwid,g_screenhei,SWP_SHOWWINDOW); CRect rc; GetClientRect(rc); m_pChart->SetParent(this); m_pChart->MoveWindow (rc); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void ShowMschart::OnDestroy() { // TODO: Add your message handler code here m_pChart->SetParent (m_pParent); g_hShowChartWnd=NULL; CDialog::OnDestroy(); } void ShowMschart::OnClose() { // TODO: Add your message handler code here and/or call default CDialog::OnCancel(); }