123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- #if !defined(AFX_BMPTAB_H__7DCB7FED_B1D0_46B0_852D_9E7B6F93D59B__INCLUDED_)
- #define AFX_BMPTAB_H__7DCB7FED_B1D0_46B0_852D_9E7B6F93D59B__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif
- #include <afxtempl.h>
- #include <afxcoll.h>
- #include "EnBitmap.h"
- class CSkinTab : public CStatic
- {
- public:
- CSkinTab();
- public:
- typedef struct tabitem
- {
- int nIndex;
- HICON icon;
- void *pVoid;
- }TABITEM,*PTABITEM;
- public:
- public:
- CDC m_memDC;
- CPtrArray m_aryItem;
- HICON m_hIconHand;
- BOOL m_bIsCDC;
- DWORD m_dwState;
- CEnBitmap m_bmpBG;
- CEnBitmap m_bmpNormal;
- CEnBitmap m_bmpHover;
- CEnBitmap m_bmpHdown;
- int m_iCurrentSelect;
- int m_iCurrentFouce;
- enum{
- HTNORMAL =0x0001,
- HTHOVER =0x0002,
- HTHDOWN =0x0003
- };
-
-
- public:
- protected:
- virtual void PreSubclassWindow();
-
- public:
- void GetTabItemRect(int nIndex,CRect *rc);
- void AddTabItem(TABITEM &item);
- void SetBmp(UINT nBmpNormal, UINT nBmpHover, UINT nBmpHdown);
- void SetSkin(CString strNormal, CString strHover, CString strDown);
- void SetSkin(CString strBmp);
- void SetSkinBG(CString strBmpBG);
- void SetIcon(int nIndex,UINT nIcon,void *pVoid);
- void SetIcon(int nIndex,LPCTSTR szIcon,void *pVoid);
- void AddTabItem(UINT nBmpNormal, UINT nBmpHover, UINT nBmpHdown, UINT nIcon, void *pVoid);
- virtual ~CSkinTab();
- int Width(){return 35;}
- int Heighth(){return m_aryItem.GetSize()*35;}
-
- protected:
-
- afx_msg void OnPaint();
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg BOOL OnEraseBkgnd(CDC* pDC);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
-
- DECLARE_MESSAGE_MAP()
- };
- #endif
|