////////////////////////////////////////////////////////////////////////// // 文件预览 // 创建人: 周风生、黄荣平 ////////////////////////////////////////////////////////////////////////// #if !defined(AFX_HYCOOLBAR2_H__F5B3EFEC_7B02_4A4E_B3D5_6B989FCB90F7__INCLUDED_) #define AFX_HYCOOLBAR2_H__F5B3EFEC_7B02_4A4E_B3D5_6B989FCB90F7__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif #include "shsSizingControlBar.h" #include "GsPreviewCtrl.h" #include "shsFlatButton.h" #include "shsFlatCaption.h" #ifndef baseCCoolBar #define baseCCoolBar CHYSizingControlBar #endif class CHYCoolBar2: public CHYSizingControlBar { DECLARE_DYNAMIC(CHYCoolBar2); public: CHYCoolBar2(); public: virtual BOOL HasGripper() const; public: virtual void OnUpdateCmdUI(CFrameWnd *pTarget, BOOL bDisableIfNoHndler); virtual BOOL Create(LPCTSTR lpszWindowName, CWnd *pParentWnd, CSize sizeDefault, BOOL bHasGripper, UINT nID, DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP); virtual BOOL Create(LPCTSTR lpszWindowName, CWnd *pParentWnd, UINT nID, DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP); public: CGsPreviewCtrl m_previewCtrl; BOOL m_ShowPreViewCtl; void SetNotifyWindow(HWND hNotifyWnd); HWND GetNotifyWindow() { return m_hNotifyWnd; }; virtual ~CHYCoolBar2(); protected: // implementation helpers virtual void NcPaintGripper(CDC *pDC, CRect rcClient); virtual void NcCalcClient(LPRECT pRc, UINT nDockBarID); protected: int m_cyGripper; CHYFlatButton m_biHide; BOOL m_bActive; // a child has focus CString m_sFontFace; HWND m_hNotifyWnd; // 消息通知窗口,默认为父窗口 protected: afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point); afx_msg LRESULT OnNcHitTest(CPoint point); afx_msg LRESULT OnSetText(WPARAM wParam, LPARAM lParam); afx_msg BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT *pResult); afx_msg void OnSize(UINT nType, int cx, int cy); // 屏蔽双击弹出Bar,不能浮动 afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); DECLARE_MESSAGE_MAP() }; #endif