home *** CD-ROM | disk | FTP | other *** search
/ Troubleshooting Netware Systems / CSTRIAL0196.BIN / attach / msj / v10n03 / bocole.exe / BOUNCE.H < prev    next >
C/C++ Source or Header  |  1995-03-01  |  2KB  |  69 lines

  1. // bounce.h : Declares the class interfaces for the Bounce child window.
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992 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 Microsoft
  9. // WinHelp documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12. //
  13.  
  14. #ifndef __BOUNCE_H__
  15. #define __BOUNCE_H__
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18.  
  19. class CBounceWnd : public CMDIChildWnd
  20. {
  21. public:
  22.     CBounceWnd();
  23.     BOOL Create(LPCSTR szTitle, LONG style = 0,
  24.                 const RECT& rect = rectDefault,
  25.                 CMDIFrameWnd* pParent = NULL);
  26.  
  27. // Implementation
  28. protected:
  29.     static CMenu NEAR menu;     // menu for all BOUNCE windows
  30.  
  31.     // bounce window client area and bouncing ball color/size parameters
  32.     UINT m_nIDColor;
  33.     COLORREF m_clrBall;
  34.  
  35.     BOOL m_bFastSpeed;          // current speed
  36.  
  37.     CPoint m_ptPixel;           // pixel size
  38.     CSize m_sizeRadius;         // radius of ball
  39.     CSize m_sizeMove;           // move speed
  40.     CSize m_sizeTotal;          // total size for ball bitmap
  41.     CPoint m_ptCenter;          // current center for the ball
  42.  
  43.     // for replicating bouncing ball
  44.     CBitmap m_bmBall;
  45.  
  46.     void MakeNewBall();
  47.     void ChangeSpeed();
  48.  
  49.     // message handlers
  50.     //{{AFX_MSG(CBounceWnd)
  51.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  52.     afx_msg void OnSize(UINT nType, int cx, int cy);
  53.     afx_msg void OnTimer(UINT nIDEvent);
  54.     afx_msg void OnUpdateColor(CCmdUI* pCmdUI);
  55.     afx_msg void OnColor();
  56.     afx_msg void OnCustomColor();
  57.     afx_msg void OnUpdateSlow(CCmdUI* pCmdUI);
  58.     afx_msg void OnSlow();
  59.     afx_msg void OnUpdateFast(CCmdUI* pCmdUI);
  60.     afx_msg void OnFast();
  61.     //}}AFX_MSG
  62.  
  63.     DECLARE_MESSAGE_MAP()
  64. };
  65.  
  66. /////////////////////////////////////////////////////////////////////////////
  67.  
  68. #endif // __BOUNCE_H__
  69.