home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / advanced / mtgdi / mtgdivw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.0 KB  |  76 lines

  1. // mtgdivw.h : interface of the CThreadView class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include "threads.h"
  14.  
  15. class CThreadView : public CView
  16. {
  17. protected: // create from serialization only
  18.     CThreadView();
  19.     DECLARE_DYNCREATE(CThreadView)
  20.  
  21. // Attributes
  22. public:
  23.     CClientDC *m_pDC;
  24.     CTypedPtrList<CObList,CGDIThread*>     m_threadList;
  25.     CThreadDoc* GetDocument();
  26.  
  27. // Operations
  28. public:
  29.  
  30. // Overrides
  31.     // ClassWizard generated virtual function overrides
  32.     //{{AFX_VIRTUAL(CThreadView)
  33.     public:
  34.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  35.     //}}AFX_VIRTUAL
  36.  
  37. // Implementation
  38. public:
  39.     void StartThread(int ThreadID);
  40.     void UpdateTitle(int nThreads = -1);
  41.     virtual ~CThreadView();
  42. #ifdef _DEBUG
  43.     virtual void AssertValid() const;
  44.     virtual void Dump(CDumpContext& dc) const;
  45. #endif
  46.  
  47. protected:
  48.  
  49. // Generated message map functions
  50. protected:
  51.     //{{AFX_MSG(CThreadView)
  52.     afx_msg void OnNewball();
  53.     afx_msg void OnKillThreads();
  54.     afx_msg void OnDestroy();
  55.     afx_msg void OnNewline();
  56.     afx_msg void OnNewrectangle();
  57.     afx_msg void On10newballs();
  58.     afx_msg void On10newlines();
  59.     afx_msg void On10newrectangles();
  60.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  61.     afx_msg void OnSize(UINT nType, int cx, int cy);
  62.     afx_msg void On25newballs();
  63.     afx_msg void On25newlines();
  64.     afx_msg void On25newrectangles();
  65.     afx_msg void OnThreadKillThreadsSlow();
  66.     //}}AFX_MSG
  67.     DECLARE_MESSAGE_MAP()
  68. };
  69.  
  70. #ifndef _DEBUG  // debug version in mtgdivw.cpp
  71. inline CThreadDoc* CThreadView::GetDocument()
  72.    { return (CThreadDoc*)m_pDocument; }
  73. #endif
  74.  
  75. /////////////////////////////////////////////////////////////////////////////
  76.