Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
2.7 KiB

  1. /*--------------------------------------------------------------------------*
  2. *
  3. * Microsoft Windows
  4. * Copyright (C) Microsoft Corporation, 1992 - 1999
  5. *
  6. * File: mdiuisim.h
  7. *
  8. * Contents: Interface file for CMDIMenuDecoration
  9. *
  10. * History: 17-Nov-97 jeffro Created
  11. *
  12. *--------------------------------------------------------------------------*/
  13. #if !defined(AFX_MDIUISIM_H__EB2A4CC1_5F5E_11D1_8009_0000F875A9CE__INCLUDED_)
  14. #define AFX_MDIUISIM_H__EB2A4CC1_5F5E_11D1_8009_0000F875A9CE__INCLUDED_
  15. #if _MSC_VER >= 1000
  16. #pragma once
  17. #endif // _MSC_VER >= 1000
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CMDIMenuDecoration window
  20. // window styles
  21. #define MMDS_CLOSE 0x0001
  22. #define MMDS_MINIMIZE 0x0002
  23. #define MMDS_MAXIMIZE 0x0004
  24. #define MMDS_RESTORE 0x0008
  25. #define MMDS_AUTOSIZE 0x0010
  26. #define MMDS_BTNSTYLES 0x000F
  27. class CMDIMenuDecoration : public CWnd
  28. {
  29. class CMouseTrackContext
  30. {
  31. public:
  32. CMouseTrackContext (CMDIMenuDecoration*, CPoint);
  33. ~CMouseTrackContext ();
  34. void Track (CPoint);
  35. int HitTest (CPoint) const;
  36. void ToggleHotButton ();
  37. int m_nHotButton;
  38. private:
  39. CMDIMenuDecoration* m_pMenuDec;
  40. CRect m_rectButton[4];
  41. bool m_fHotButtonPressed;
  42. };
  43. typedef std::auto_ptr<CMouseTrackContext> CMouseTrackContextPtr;
  44. friend class CMouseTrackContext;
  45. CMouseTrackContextPtr m_spTrackCtxt;
  46. // Construction
  47. public:
  48. CMDIMenuDecoration();
  49. // Attributes
  50. public:
  51. // Operations
  52. public:
  53. // Overrides
  54. // ClassWizard generated virtual function overrides
  55. //{{AFX_VIRTUAL(CMDIMenuDecoration)
  56. //}}AFX_VIRTUAL
  57. // Implementation
  58. public:
  59. virtual ~CMDIMenuDecoration();
  60. // Generated message map functions
  61. protected:
  62. //{{AFX_MSG(CMDIMenuDecoration)
  63. afx_msg void OnPaint();
  64. afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
  65. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  66. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  67. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  68. //}}AFX_MSG
  69. DECLARE_MESSAGE_MAP()
  70. private:
  71. CMenu* GetActiveSystemMenu ();
  72. bool IsSysCommandEnabled (int nSysCommand, CMenu* pSysMenu = NULL);
  73. };
  74. /////////////////////////////////////////////////////////////////////////////
  75. //{{AFX_INSERT_LOCATION}}
  76. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  77. #endif // !defined(AFX_MDIUISIM_H__EB2A4CC1_5F5E_11D1_8009_0000F875A9CE__INCLUDED_)