ShowMschart.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // ShowMschart.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "ShowMschart.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // ShowMschart dialog
  13. ShowMschart::ShowMschart(CWnd* pParent /*=NULL*/)
  14. : CDialog(ShowMschart::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(ShowMschart)
  17. // NOTE: the ClassWizard will add member initialization here
  18. //}}AFX_DATA_INIT
  19. }
  20. void ShowMschart::DoDataExchange(CDataExchange* pDX)
  21. {
  22. CDialog::DoDataExchange(pDX);
  23. //{{AFX_DATA_MAP(ShowMschart)
  24. // NOTE: the ClassWizard will add DDX and DDV calls here
  25. //}}AFX_DATA_MAP
  26. }
  27. BEGIN_MESSAGE_MAP(ShowMschart, CDialog)
  28. //{{AFX_MSG_MAP(ShowMschart)
  29. ON_WM_DESTROY()
  30. ON_WM_CLOSE()
  31. //}}AFX_MSG_MAP
  32. END_MESSAGE_MAP()
  33. /////////////////////////////////////////////////////////////////////////////
  34. // ShowMschart message handlers
  35. extern HWND g_hShowChartWnd;
  36. BOOL ShowMschart::OnInitDialog()
  37. {
  38. CDialog::OnInitDialog();
  39. g_hShowChartWnd=this->GetSafeHwnd ();
  40. // TODO: Add extra initialization here
  41. ::SetWindowPos(m_hWnd,HWND_TOP,0 ,0,g_screenwid,g_screenhei,SWP_SHOWWINDOW);
  42. CRect rc;
  43. GetClientRect(rc);
  44. m_pChart->SetParent(this);
  45. m_pChart->MoveWindow (rc);
  46. return TRUE; // return TRUE unless you set the focus to a control
  47. // EXCEPTION: OCX Property Pages should return FALSE
  48. }
  49. void ShowMschart::OnDestroy()
  50. {
  51. // TODO: Add your message handler code here
  52. m_pChart->SetParent (m_pParent);
  53. g_hShowChartWnd=NULL;
  54. CDialog::OnDestroy();
  55. }
  56. void ShowMschart::OnClose()
  57. {
  58. // TODO: Add your message handler code here and/or call default
  59. CDialog::OnCancel();
  60. }