WndEx.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. #define SWAP_MIN_MAX 1
  11. #define FORCE_MIN 2
  12. #define FORCE_MAX 3
  13. class CWndEx : public CWnd
  14. {
  15. // Construction
  16. public:
  17. CWndEx();
  18. // Attributes
  19. public:
  20. // Operations
  21. public:
  22. // Overrides
  23. // ClassWizard generated virtual function overrides
  24. //{{AFX_VIRTUAL(CWndEx)
  25. public:
  26. virtual BOOL Create(const CRect& crStart, CWnd* pParentWnd);
  27. virtual BOOL PreTranslateMessage(MSG* pMsg);
  28. //}}AFX_VIRTUAL
  29. public:
  30. void InvalidateNc();
  31. void SetCaptionOn(int nPos, bool bOnstartup = false);
  32. void MinMaxWindow(long lOption = SWAP_MIN_MAX);
  33. void GetWindowRectEx(LPRECT lpRect);
  34. bool SetCaptionColorActive(BOOL bPersistant, BOOL ConnectedToClipboard);
  35. void SetAutoMaxDelay(long lDelay) { m_lDelayMaxSeconds = lDelay; }
  36. bool GetMinimized() { return m_DittoWindow.m_bMinimized; }
  37. void SetCustomWindowTitle(CString title) { m_DittoWindow.m_customWindowTitle = title; m_DittoWindow.m_useCustomWindowTitle = true; }
  38. void SetToolTipText(CString text);
  39. protected:
  40. CDittoWindow m_DittoWindow;
  41. CRect m_crFullSizeWindow;
  42. bool m_bMaxSetTimer;
  43. COleDateTime m_TimeMinimized;
  44. COleDateTime m_TimeMaximized;
  45. int m_lDelayMaxSeconds;
  46. CToolTipCtrl m_toolTip;
  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. };
  69. /////////////////////////////////////////////////////////////////////////////
  70. //{{AFX_INSERT_LOCATION}}
  71. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  72. #endif // !defined(AFX_WNDEX_H__E14EA019_CE71_469A_AEB4_3D3CB271C531__INCLUDED_)