123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- /************************************************************************/
- /* Copyright (C), 2016-2020, [IT], 保留所有权利;
- /* 模 块 名:;
- /* 描 述:;
- /*
- /* 版 本:[V];
- /* 作 者:[IT];
- /* 日 期:[8/19/2016];
- /*
- /*
- /* 注 意:;
- /*
- /* 修改记录:[IT];
- /* 修改日期:;
- /* 修改版本:;
- /* 修改内容:;
- /************************************************************************/
- #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 // _MSC_VER > 1000
- // BmpTab.h : header file
- //
- /////////////////////////////////////////////////////////////////////////////
- // CSkinTab window
- #include <afxtempl.h>
- #include <afxcoll.h>
- #include "EnBitmap.h"
- class CSkinTab : public CStatic
- {
- // Construction
- public:
- CSkinTab();
- public:
- typedef struct tabitem
- {
- int nIndex;
- HICON icon;
- void *pVoid;
- }TABITEM,*PTABITEM;
- // Attributes
- public:
- // Operations
- 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
- };
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CSkinTab)
- public:
- protected:
- virtual void PreSubclassWindow();
- //}}AFX_VIRTUAL
- // Implementation
- 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;}
- // Generated message map functions
- protected:
- //{{AFX_MSG(CSkinTab)
- 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);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_BMPTAB_H__7DCB7FED_B1D0_46B0_852D_9E7B6F93D59B__INCLUDED_)
|