WndEx.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #if !defined(AFX_WNDEX_H__E14EA019_CE71_469A_AEB4_3D3CB271C531__INCLUDED_)
  2. #define AFX_WNDEX_H__E14EA019_CE71_469A_AEB4_3D3CB271C531__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // WndEx.h : header file
  7. //
  8. #include "DittoWindow.h"
  9. #define SWAP_MIN_MAX 1
  10. #define FORCE_MIN 2
  11. #define FORCE_MAX 3
  12. class CWndEx : public CWnd
  13. {
  14. // Construction
  15. public:
  16. CWndEx();
  17. // Attributes
  18. public:
  19. // Operations
  20. public:
  21. // Overrides
  22. // ClassWizard generated virtual function overrides
  23. //{{AFX_VIRTUAL(CWndEx)
  24. public:
  25. virtual BOOL Create(const CRect& crStart, CWnd* pParentWnd);
  26. virtual BOOL PreTranslateMessage(MSG* pMsg);
  27. //}}AFX_VIRTUAL
  28. public:
  29. bool SetCaptionColors( COLORREF left, COLORREF right );
  30. void InvalidateNc();
  31. void SetCaptionOn(int nPos, bool bOnstartup = false);
  32. void SetAutoHide(BOOL bAutoHide);
  33. void MinMaxWindow(long lOption = SWAP_MIN_MAX);
  34. void GetWindowRectEx(LPRECT lpRect);
  35. bool SetCaptionColorActive(bool bActive, bool ConnectedToClipboard);
  36. protected:
  37. CDittoWindow m_DittoWindow;
  38. CRect m_crFullSizeWindow;
  39. bool m_bMaxSetTimer;
  40. // Implementation
  41. public:
  42. virtual ~CWndEx();
  43. // Generated message map functions
  44. protected:
  45. //{{AFX_MSG(CWndEx)
  46. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  47. afx_msg void OnNcPaint();
  48. afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
  49. afx_msg UINT OnNcHitTest(CPoint point);
  50. afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
  51. afx_msg void OnNcMouseMove(UINT nHitTest, CPoint point);
  52. afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);
  53. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  54. afx_msg void OnTimer(UINT nIDEvent);
  55. afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
  56. afx_msg void OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex,BOOL bSysMenu);
  57. //}}AFX_MSG
  58. DECLARE_MESSAGE_MAP()
  59. public:
  60. afx_msg void OnSize(UINT nType, int cx, int cy);
  61. };
  62. /////////////////////////////////////////////////////////////////////////////
  63. //{{AFX_INSERT_LOCATION}}
  64. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  65. #endif // !defined(AFX_WNDEX_H__E14EA019_CE71_469A_AEB4_3D3CB271C531__INCLUDED_)