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

  1. // drawwnd.h : header file
  2. //
  3.  
  4. /////////////////////////////////////////////////////////////////////////////
  5. // CDrawWnd window
  6.  
  7. class CDrawWnd : public CWnd
  8. {
  9. // Construction
  10. public:
  11.     CDrawWnd(BOOL bAutoDelete = TRUE);
  12.  
  13. // Attributes
  14. public:
  15.     CRgn m_rgnLast;
  16.     int m_nWidth;
  17.     int m_nSteps;
  18.     int m_nPos;
  19.     int m_nStep;
  20.     int m_nScale;
  21.     int m_nHeight;
  22.     int m_nStyle;
  23.     LOGBRUSH m_logbrush;
  24.     LOGBRUSH m_logbrushBlack;
  25.     static LPCTSTR m_lpszClassName;
  26.     void SetSpeed(int nSpeed);
  27.     void SetResolution(int nRes);
  28.     void SetColor(COLORREF cr);
  29.     void SetPenWidth(int nWidth);
  30.     void SetLineStyle(int nStyle);
  31.  
  32. // Operations
  33. public:
  34.     void DrawLetter(CDC& dc, CPoint pt, int p1[][3], int p2[][3], int nLen);
  35.     void Draw(CDC& dc, int nWidth);
  36.  
  37. // Overrides
  38.     // ClassWizard generated virtual function overrides
  39.     //{{AFX_VIRTUAL(CDrawWnd)
  40.     public:
  41.     virtual BOOL Create(DWORD dwExStyle, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
  42.     protected:
  43.     virtual void PostNcDestroy();
  44.     //}}AFX_VIRTUAL
  45.  
  46. // Implementation
  47. public:
  48.     virtual ~CDrawWnd();
  49.  
  50. protected:
  51.     BOOL m_bAutoDelete;
  52.  
  53.     // Generated message map functions
  54. protected:
  55.     //{{AFX_MSG(CDrawWnd)
  56.     afx_msg void OnTimer(UINT nIDEvent);
  57.     afx_msg void OnPaint();
  58.     afx_msg void OnSize(UINT nType, int cx, int cy);
  59.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  60.     //}}AFX_MSG
  61.     DECLARE_MESSAGE_MAP()
  62. };
  63.  
  64. /////////////////////////////////////////////////////////////////////////////
  65.