home *** CD-ROM | disk | FTP | other *** search
/ Mastering Microsoft Visual C++ 4 (2nd Edition) / VisualC4.ISO / mandelmt / mainfrm.cpp next >
Encoding:
C/C++ Source or Header  |  1995-11-30  |  1.8 KB  |  82 lines

  1. // MainFrm.cpp : implementation of the CMainFrame class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "MandelMT.h"
  6.  
  7. #include "MainFrm.h"
  8. #include "MandMDoc.h"
  9. #include "MandMTVw.h"
  10.  
  11. #ifdef _DEBUG
  12. #define new DEBUG_NEW
  13. #undef THIS_FILE
  14. static char THIS_FILE[] = __FILE__;
  15. #endif
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CMainFrame
  19.  
  20. IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
  21.  
  22. BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
  23.    //{{AFX_MSG_MAP(CMainFrame)
  24.    ON_WM_SYSCOMMAND()
  25.    //}}AFX_MSG_MAP
  26. END_MESSAGE_MAP()
  27.  
  28. /////////////////////////////////////////////////////////////////////////////
  29. // CMainFrame construction/destruction
  30.  
  31. CMainFrame::CMainFrame()
  32. {
  33.    // TODO: add member initialization code here
  34.    
  35. }
  36.  
  37. CMainFrame::~CMainFrame()
  38. {
  39. }
  40.  
  41. BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
  42. {
  43.    // TODO: Modify the Window class or styles here by modifying
  44.    //  the CREATESTRUCT cs
  45.  
  46.    return CFrameWnd::PreCreateWindow(cs);
  47. }
  48.  
  49. /////////////////////////////////////////////////////////////////////////////
  50. // CMainFrame diagnostics
  51.  
  52. #ifdef _DEBUG
  53. void CMainFrame::AssertValid() const
  54. {
  55.    CFrameWnd::AssertValid();
  56. }
  57.  
  58. void CMainFrame::Dump(CDumpContext& dc) const
  59. {
  60.    CFrameWnd::Dump(dc);
  61. }
  62.  
  63. #endif //_DEBUG
  64.  
  65. /////////////////////////////////////////////////////////////////////////////
  66. // CMainFrame message handlers
  67.  
  68. void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam) 
  69. {
  70.    // TODO: Add your message handler code here and/or call default
  71.    
  72.    CWinThread *PDrawThread = ((CMandelMTView *)GetActiveView ())->m_PDrawThread; 
  73.  
  74.    if (PDrawThread)
  75.       PDrawThread->SuspendThread ();
  76.  
  77.    CFrameWnd::OnSysCommand(nID, lParam);
  78.  
  79.    if (PDrawThread)
  80.       PDrawThread->ResumeThread ();
  81. }
  82.