|
|
1.1 ! root 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: // QuickHelp 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: private: ! 22: ! 23: // bounce window client area and bouncing ball color/size parameters ! 24: ! 25: short m_nColor, m_xPixel, m_yPixel, m_cxRadius, m_cyRadius; ! 26: short m_cxMove, m_cyMove, m_cxClient, m_cyClient, m_cxTotal, m_cyTotal; ! 27: short m_xCenter, m_yCenter; ! 28: ! 29: short m_nSpeed; ! 30: ! 31: // for replicating bouncing ball ! 32: ! 33: CBitmap* m_pBitmap; ! 34: COLORREF m_clrBall; ! 35: ! 36: CMenu* m_pMenuCurrent; ! 37: BOOL m_bWindowActive; ! 38: ! 39: public: ! 40: ! 41: CBounceWnd(); ! 42: ! 43: BOOL Create(LPCSTR szTitle, LONG style = 0, ! 44: const RECT& rect = rectDefault, ! 45: CMDIFrameWnd* pParent = NULL); ! 46: ! 47: virtual ~CBounceWnd(); ! 48: ! 49: void MakeNewBall(); ! 50: ! 51: // message handlers ! 52: ! 53: afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); ! 54: afx_msg void OnDestroy(); ! 55: afx_msg void OnSize(UINT nType, int cx, int cy); ! 56: afx_msg void OnTimer(UINT nIDEvent); ! 57: afx_msg void OnMDIActivate(BOOL bActivate, ! 58: CWnd* pActivatedWnd, CWnd* pDeactivatedWnd); ! 59: afx_msg void OnColor(); ! 60: afx_msg void OnSpeed(); ! 61: ! 62: DECLARE_MESSAGE_MAP() ! 63: }; ! 64: ! 65: ///////////////////////////////////////////////////////////////////////////// ! 66: ! 67: #endif // __BOUNCE_H__ ! 68:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.