WndEx.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. #include "GdipButton.h"
  10. #include "SnapWindow.h"
  11. #define SWAP_MIN_MAX 1
  12. #define FORCE_MIN 2
  13. #define FORCE_MAX 3
  14. class CWndEx : public CWnd
  15. {
  16. // Construction
  17. public:
  18. CWndEx();
  19. // Attributes
  20. public:
  21. // Operations
  22. public:
  23. // Overrides
  24. // ClassWizard generated virtual function overrides
  25. //{{AFX_VIRTUAL(CWndEx)
  26. public:
  27. virtual BOOL Create(const CRect& crStart, CWnd* pParentWnd);
  28. virtual BOOL PreTranslateMessage(MSG* pMsg);
  29. //}}AFX_VIRTUAL
  30. public:
  31. void InvalidateNc();
  32. void SetCaptionOn(int nPos, bool bOnstartup, int captionSize, int captionFontSize);
  33. void MinMaxWindow(long lOption = SWAP_MIN_MAX);
  34. void GetWindowRectEx(LPRECT lpRect);
  35. bool SetCaptionColorActive(BOOL bPersistant, BOOL ConnectedToClipboard);
  36. void SetAutoMaxDelay(long lDelay) { m_lDelayMaxSeconds = lDelay; }
  37. bool GetMinimized() { return m_DittoWindow.m_bMinimized; }
  38. void SetCustomWindowTitle(CString title);
  39. void SetToolTipText(CString text);
  40. int GetCaptionSize() { return m_DittoWindow.m_captionBorderWidth; }
  41. CDittoWindow m_DittoWindow;
  42. protected:
  43. bool m_bMaxSetTimer;
  44. int m_lDelayMaxSeconds;
  45. CToolTipCtrl m_toolTip;
  46. SnapWindow m_snap;
  47. // Implementation
  48. public:
  49. virtual ~CWndEx();
  50. // Generated message map functions
  51. protected:
  52. //{{AFX_MSG(CWndEx)
  53. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  54. afx_msg void OnNcPaint();
  55. afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
  56. afx_msg HITTEST_RET OnNcHitTest(CPoint point);
  57. afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
  58. afx_msg void OnNcMouseMove(UINT nHitTest, CPoint point);
  59. afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);
  60. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  61. afx_msg void OnTimer(UINT_PTR nIDEvent);
  62. afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
  63. afx_msg void OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex,BOOL bSysMenu);
  64. //}}AFX_MSG
  65. DECLARE_MESSAGE_MAP()
  66. public:
  67. afx_msg void OnSize(UINT nType, int cx, int cy);
  68. afx_msg void OnMoving(UINT fwSide, LPRECT pRect);
  69. afx_msg void OnEnterSizeMove();
  70. };
  71. /////////////////////////////////////////////////////////////////////////////
  72. //{{AFX_INSERT_LOCATION}}
  73. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  74. #endif // !defined(AFX_WNDEX_H__E14EA019_CE71_469A_AEB4_3D3CB271C531__INCLUDED_)