//--------------------------------------------------------------------------- #ifndef StyleSelListBoxUnitH #define StyleSelListBoxUnitH #include "SkinListBoxUnit.h" #include "GlobalUnit.h" #include using namespace std; //--------------------------------------------------------------------------- namespace StyleSelectListBoxUnit { //--------------------------------------------------------------------------- class TListBox : public TSkinListBox { private: TBitmap *m_imgBackground; TBitmap *m_imgBackgroundLine; TBitmap *m_imgSelectedFlag; TBitmap *m_imgSelectedBkg; TBitmap * m_pBitmapHot ; TBitmap * m_pBitmapNml; TBitmap * m_imgDwnLoadHot; TBitmap * m_imgDwnLoadNml; TBrush * m_brImg; TFont * m_pFntText; COLORREF m_clrSelected, m_clrBevelRaise, m_clrBevelLower; int m_iPlayItemIndex; protected: virtual void __fastcall DrawItem(int Index, const System::Types::TRect &Rect, Winapi::Windows::TOwnerDrawState State); MESSAGE void __fastcall WMPaint(Winapi::Messages::TWMPaint &Message); BEGIN_MESSAGE_MAP MESSAGE_HANDLER(WM_PAINT, TWMPaint, WMPaint) END_MESSAGE_MAP(TSkinListBox) public: __fastcall virtual TListBox(System::Classes::TComponent* AOwner); __fastcall ~TListBox(); virtual void __fastcall Clear(void); void SetPlayItemIndex(int iPlayItemIndex = -1); void SetItemIndex(const vector vcItemIndex,const int iCutPage); void SetItemIconState(const int iItemIndex,const int iIconState); void ResetItemsData(vector vcItemsData,const int iCutPage,vector vcItemsIndex,bool bIsReDraw); void ReDrawItemsState(vector vcItemIndexs,bool bIsReDraw); void DrawDownLoadImgState(const TRect rtArea,const int iImgIndex,TBitmap * tBitmap); private: vector m_vciItemIndex; int m_iCurPage; int m_iItemIndex; int m_iItemState; int m_iHotItemIndex; int m_iDLoadItemIndex; vector m_vcItemsData; // vector m_vcOldItemsData; }; } using namespace StyleSelectListBoxUnit; #endif