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.

118 lines
3.7 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. // Copyright (c) 2002 Microsoft Corporation. All rights reserved.
  3. // Copyright (c) 2002 OSR Open Systems Resources, Inc.
  4. //
  5. // DockDialogBar.h : header file for CDockDialogBar class
  6. //////////////////////////////////////////////////////////////////////////////
  7. #if !defined(AFX_DOCKDIALOGBAR_H__85D92394_C61A_4310_ABA1_F4A61E034A7D__INCLUDED_)
  8. #define AFX_DOCKDIALOGBAR_H__85D92394_C61A_4310_ABA1_F4A61E034A7D__INCLUDED_
  9. #if _MSC_VER >= 1000
  10. #pragma once
  11. #endif // _MSC_VER >= 1000
  12. #include "afxpriv.h"
  13. #include "afxtempl.h"
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CDockDialogBar window
  16. class CDockDialogBar : public CControlBar
  17. {
  18. DECLARE_DYNAMIC(CDockDialogBar);
  19. const COLORREF m_clrBtnHilight;
  20. const COLORREF m_clrBtnShadow;
  21. // Construction / destruction
  22. public:
  23. CDockDialogBar();
  24. // Attributes
  25. public:
  26. BOOL IsHorz() const;
  27. // Operations
  28. public:
  29. // Overridables
  30. virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
  31. // Overrides
  32. public:
  33. // ClassWizard generated virtual function overrides
  34. //{{AFX_VIRTUAL(CDockDialogBar)
  35. public:
  36. virtual BOOL Create(CWnd* pParentWnd, CDialog *pDialog, CString &pTitle, UINT nID, DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_LEFT, BOOL bShowTitleInGripper = FALSE);
  37. virtual CSize CalcFixedLayout( BOOL bStretch, BOOL bHorz );
  38. virtual CSize CalcDynamicLayout( int nLength, DWORD dwMode );
  39. //}}AFX_VIRTUAL
  40. // Implementation
  41. public:
  42. virtual ~CDockDialogBar();
  43. void StartTracking();
  44. void StopTracking(BOOL bAccept);
  45. void OnInvertTracker(const CRect& rect);
  46. // implementation helpers
  47. CPoint& ClientToWnd(CPoint& point);
  48. CString m_pTitle;
  49. protected:
  50. void DrawGripper(CDC &dc);
  51. CSize m_sizeMin;
  52. CSize m_sizeHorz;
  53. CSize m_sizeVert;
  54. CSize m_sizeFloat;
  55. CRect m_rectBorder;
  56. CRect m_rectTracker;
  57. UINT m_nDockBarID;
  58. CPoint m_ptOld;
  59. BOOL m_bTracking;
  60. BOOL m_bInRecalcNC;
  61. int m_cxEdge;
  62. CRect m_rectUndock;
  63. CRect m_rectClose;
  64. CRect m_rectGripper;
  65. int m_cxGripper;
  66. int m_cxBorder;
  67. CDialog* m_pDialog;
  68. CBrush m_brushBkgd;
  69. BOOL m_bKeepSize;
  70. int m_cyBorder;
  71. int m_cMinWidth;
  72. int m_cMinHeight;
  73. int m_cCaptionSize;
  74. BOOL m_bShowTitleInGripper;
  75. // Generated message map functions
  76. protected:
  77. //{{AFX_MSG(CDockDialogBar)
  78. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  79. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  80. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  81. afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
  82. afx_msg void OnNcPaint();
  83. afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
  84. afx_msg UINT OnNcHitTest(CPoint point);
  85. afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
  86. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  87. afx_msg void OnCaptureChanged(CWnd *pWnd);
  88. afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  89. afx_msg void OnNcLButtonDblClk(UINT nHitTest, CPoint point);
  90. afx_msg void OnWindowPosChanging(WINDOWPOS FAR* LpWndPos);
  91. //}}AFX_MSG
  92. DECLARE_MESSAGE_MAP()
  93. };
  94. /////////////////////////////////////////////////////////////////////////////
  95. //{{AFX_INSERT_LOCATION}}
  96. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  97. #endif // !defined(AFX_DOCKDIALOGBAR_H__85D92394_C61A_4310_ABA1_F4A61E034A7D__INCLUDED_)