home *** CD-ROM | disk | FTP | other *** search
/ Xentax forum attachments archive / xentax.7z / 8090 / ModelEdit.7z / SolidRectWnd.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-03-08  |  1.9 KB  |  72 lines

  1. #if !defined(AFX_SOLIDRECTWND_H__97897E7F_394C_4FBE_B1DB_71DECE0AE183__INCLUDED_)
  2. #define AFX_SOLIDRECTWND_H__97897E7F_394C_4FBE_B1DB_71DECE0AE183__INCLUDED_
  3.  
  4. #if _MSC_VER > 1000
  5. #pragma once
  6. #endif // _MSC_VER > 1000
  7. // SolidRectWnd.h : header file
  8. //
  9.  
  10. /////////////////////////////////////////////////////////////////////////////
  11. // SolidRectWnd window
  12.  
  13. class SolidRectWnd : public CWnd
  14. {
  15. // Construction
  16. public:
  17.     SolidRectWnd();
  18.  
  19. // Attributes
  20. public:
  21.  
  22.  
  23. protected:
  24.  
  25.     COLORREF        m_Color;
  26.     HWND            m_hParentWnd;
  27.  
  28.  
  29. // Operations
  30. public:
  31.  
  32.     // Set the rectangle's color.  It's fast to call this with the same color
  33.     // multiple times - it checks if the color is different before redrawing.
  34.     void            SetColor(COLORREF color);
  35.  
  36.     // You must call this if you want it to forward mouse messages to its parent window.
  37.     void            SetForward(BOOL bForward);
  38.  
  39. // Overrides
  40.     // ClassWizard generated virtual function overrides
  41.     //{{AFX_VIRTUAL(SolidRectWnd)
  42.     //}}AFX_VIRTUAL
  43.  
  44. // Implementation
  45. public:
  46.  
  47.     virtual ~SolidRectWnd();
  48.  
  49.     // Translate from our client space to the parent window's client space and 
  50.     // send the message to the parent window.
  51.     void    SendMouseMessageToParent(UINT msgID, WPARAM nFlags, CPoint point);
  52.  
  53.     // Generated message map functions
  54. protected:
  55.     //{{AFX_MSG(SolidRectWnd)
  56.     afx_msg void OnPaint();
  57.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  58.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  59.     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  60.     afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
  61.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  62.     //}}AFX_MSG
  63.     DECLARE_MESSAGE_MAP()
  64. };
  65.  
  66. /////////////////////////////////////////////////////////////////////////////
  67.  
  68. //{{AFX_INSERT_LOCATION}}
  69. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  70.  
  71. #endif // !defined(AFX_SOLIDRECTWND_H__97897E7F_394C_4FBE_B1DB_71DECE0AE183__INCLUDED_)
  72.