home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2001 July / VPR0107B.BIN / DRIVER / CANOPUS / MVR32 / mvr32.exe / data1.cab / Development_Kit / Vc / Samples / Multi / MainFrm.cpp < prev    next >
C/C++ Source or Header  |  2001-02-09  |  2KB  |  92 lines

  1. // MainFrm.cpp : CMainFrame クラスの動作の定義を行います。
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "Multi.h"
  6.  
  7. #include "MainFrm.h"
  8.  
  9. #ifdef _DEBUG
  10. #define new DEBUG_NEW
  11. #undef THIS_FILE
  12. static char THIS_FILE[] = __FILE__;
  13. #endif
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CMainFrame
  17.  
  18. IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
  19.  
  20. BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
  21.     //{{AFX_MSG_MAP(CMainFrame)
  22.     ON_WM_CREATE()
  23.     ON_WM_SIZE()
  24.     ON_WM_MOVE()
  25.     //}}AFX_MSG_MAP
  26. END_MESSAGE_MAP()
  27.  
  28. /////////////////////////////////////////////////////////////////////////////
  29. // CMainFrame クラスの構築/消滅
  30.  
  31. CMainFrame::CMainFrame()
  32. {
  33.     // TODO: この位置にメンバの初期化処理コードを追加してください。
  34.     
  35. }
  36.  
  37. CMainFrame::~CMainFrame()
  38. {
  39. }
  40.  
  41. int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
  42. {
  43.     if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
  44.         return -1;
  45.  
  46.     return 0;
  47. }
  48.  
  49. BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
  50. {
  51.     if( !CMDIFrameWnd::PreCreateWindow(cs) )
  52.         return FALSE;
  53.     // TODO: この位置で CREATESTRUCT cs を修正して、Window クラスやスタイルを
  54.     //       修正してください。
  55.  
  56.     return TRUE;
  57. }
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CMainFrame クラスの診断
  61.  
  62. #ifdef _DEBUG
  63. void CMainFrame::AssertValid() const
  64. {
  65.     CMDIFrameWnd::AssertValid();
  66. }
  67.  
  68. void CMainFrame::Dump(CDumpContext& dc) const
  69. {
  70.     CMDIFrameWnd::Dump(dc);
  71. }
  72.  
  73. #endif //_DEBUG
  74.  
  75. /////////////////////////////////////////////////////////////////////////////
  76. // CMainFrame メッセージ ハンドラ
  77.  
  78. #include "ChildFrm.h"
  79.  
  80. void CMainFrame::OnSize(UINT nType, int cx, int cy) 
  81. {
  82.     CMDIFrameWnd::OnSize(nType, cx, cy);
  83. }
  84.  
  85. void CMainFrame::OnMove(int x, int y) 
  86. {
  87.     CMDIFrameWnd::OnMove(x, y);
  88.     
  89.     SendMessageToDescendants(WM_MOVE);
  90. }
  91.  
  92.