| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- /************************************************************************
- * 程序名: 精仿QQ主界面
- * 制作人: 李克平, 2011年04月11日
- * 版本号: 1.0
- ************************************************************************/
- #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_)
|