/************************************************************************ * 程序名: 精仿QQ主界面 * 制作人: 李克平, 2011年04月11日 * 版本号: 1.0 ************************************************************************/ #if !defined(AFX_GFXOUTBARCTRL_H__28FA2CA4_11B7_11D2_8437_0000B43382FE__INCLUDED_) #define AFX_GFXOUTBARCTRL_H__28FA2CA4_11B7_11D2_8437_0000B43382FE__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 // GfxOutBarCtrl.h : header file // ///////////////////////////////////////////////////////////////////////////// // CGfxOutBarCtrl window #include #include "EnBitmap.h" class CGfxOutBarCtrl : public CWnd { // Construction DECLARE_DYNCREATE(CGfxOutBarCtrl) public: CGfxOutBarCtrl(); // Attributes public: CEnBitmap m_bmpNormalFolder; CEnBitmap m_bmpHoverFolder; COLORREF m_crBackground; UINT nFolderHeight; COLORREF m_crText; CFont *m_pFont; HCURSOR hHandCursor; int iLastFolderHighlighted; int iHoverFolder; int iSelFolder; HICON iSelcon; CPtrArray m_arFolder; class CBm_arFolder { public: CBm_arFolder(const char * name, DWORD exData); virtual ~CBm_arFolder(); char * cName; DWORD dwData; CWnd * pChild; }; // Operations public: enum { htNothing = -1, htFolder,htFind}; // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CGfxOutBarCtrl) //}}AFX_VIRTUAL // Implementation public: DWORD GetFolderData(int iFolder = -1); CWnd * GetFolderChild(int iFolder = -1); int AddFolderBar(const char * pFolder, CWnd * pSon, const DWORD exData = 0); void HighlightFolder(const int index); void SetFolderText(const int index, const char * text); void SetFolderImage(LPCTSTR lpszPath); void SetSelIcon(LPCTSTR lpszIconPath); void RemoveFolder(const int index); int GetSelFolder() const; int GetFolderCount() const; void SetSelFolder(const int index); int HitTestEx(const CPoint &point, int &index); void GetInsideRect(CRect &rect) const; int AddFolder(const char * cFolderName, const DWORD exData); bool GetFolderRect(const int iIndex, CRect &rect) const; BOOL Create(DWORD dwStyle, const RECT& rect, CWnd * pParentWnd, UINT nID); void SetFolderHeight(UINT nHeight){nFolderHeight = nHeight;}; virtual ~CGfxOutBarCtrl(); // Generated message map functions protected: void DrawFolder(CDC * pDC, const int iIdx, CRect rect); //{{AFX_MSG(CGfxOutBarCtrl) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg void OnPaint(); afx_msg BOOL OnEraseBkgnd(CDC* pDC); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg void OnTimer(UINT_PTR nIDEvent); afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); afx_msg void OnSize(UINT nType, int cx, int cy); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. #endif // !defined(AFX_GFXOUTBARCTRL_H__28FA2CA4_11B7_11D2_8437_0000B43382FE__INCLUDED_)