WndEx.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. protected:
  38. CDittoWindow m_DittoWindow;
  39. CRect m_crFullSizeWindow;
  40. bool m_bMaxSetTimer;
  41. COleDateTime m_TimeMinimized;
  42. COleDateTime m_TimeMaximized;
  43. int m_lDelayMaxSeconds;
  44. // Implementation
  45. public:
  46. virtual ~CWndEx();
  47. // Generated message map functions
  48. protected:
  49. //{{AFX_MSG(CWndEx)
  50. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  51. afx_msg void OnNcPaint();
  52. afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
  53. afx_msg HITTEST_RET OnNcHitTest(CPoint point);
  54. afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
  55. afx_msg void OnNcMouseMove(UINT nHitTest, CPoint point);
  56. afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);
  57. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  58. afx_msg void OnTimer(UINT_PTR nIDEvent);
  59. afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
  60. afx_msg void OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex,BOOL bSysMenu);
  61. //}}AFX_MSG
  62. DECLARE_MESSAGE_MAP()
  63. public:
  64. afx_msg void OnSize(UINT nType, int cx, int cy);
  65. };
  66. /////////////////////////////////////////////////////////////////////////////
  67. //{{AFX_INSERT_LOCATION}}
  68. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  69. #endif // !defined(AFX_WNDEX_H__E14EA019_CE71_469A_AEB4_3D3CB271C531__INCLUDED_)