123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- /************************************************************************
- * 程序名: 精仿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 <afxcoll.h>
- #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_)
|