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

  1. // BounceDoc.h : header file
  2. //
  3.  
  4. // This is a part of the Microsoft Foundation Classes C++ library.
  5. // Copyright (C) 1992-1998 Microsoft Corporation
  6. // All rights reserved.
  7. //
  8. // This source code is only intended as a supplement to the
  9. // Microsoft Foundation Classes Reference and related
  10. // electronic documentation provided with the library.
  11. // See these sources for detailed information regarding the
  12. // Microsoft Foundation Classes product.
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CBounceDoc document
  16.  
  17. class CBounceDoc : public CDocument
  18. {
  19. protected:
  20.     CBounceDoc();           // protected constructor used by dynamic creation
  21.     DECLARE_DYNCREATE(CBounceDoc)
  22.  
  23. // Attributes
  24. public:
  25.     // bounce window client area and bouncing ball color/size parameters
  26.     COLORREF m_clrBall;
  27.  
  28.     BOOL m_bFastSpeed;          // current speed
  29.  
  30.     CPoint m_ptPixel;           // pixel size
  31.     CSize m_sizeRadius;         // radius of ball
  32.     CSize m_sizeMove;           // move speed
  33.     CSize m_sizeTotal;          // total size for ball bitmap
  34.     CPoint m_ptCenter;          // current center for the ball
  35.  
  36.     //state of color buttons
  37.     BOOL m_bBlack;
  38.     BOOL m_bWhite;
  39.     BOOL m_bBlue;
  40.     BOOL m_bRed;
  41.     BOOL m_bGreen;
  42.     BOOL m_bCustom;
  43.  
  44.     // for replicating bouncing ball
  45.     CBitmap m_bmBall;
  46.  
  47. // Operations
  48. public:
  49.     void SetCustomBallColor(COLORREF clr);
  50.     void SetBallRadius(CSize radius);
  51.     void ClearAllColors();
  52.  
  53. // Overrides
  54.     // ClassWizard generated virtual function overrides
  55.     //{{AFX_VIRTUAL(CBounceDoc)
  56.     public:
  57.     virtual void Serialize(CArchive& ar);   // overridden for document i/o
  58.     protected:
  59.     virtual BOOL OnNewDocument();
  60.     //}}AFX_VIRTUAL
  61.  
  62. // Implementation
  63. public:
  64.     virtual ~CBounceDoc();
  65. #ifdef _DEBUG
  66.     virtual void AssertValid() const;
  67.     virtual void Dump(CDumpContext& dc) const;
  68. #endif
  69.  
  70.     // Generated message map functions
  71. protected:
  72.     //{{AFX_MSG(CBounceDoc)
  73.         // NOTE - the ClassWizard will add and remove member functions here.
  74.     //}}AFX_MSG
  75.     DECLARE_MESSAGE_MAP()
  76. };
  77.