#ifndef _COMMON_OWNERDRAWLISTBINARYLED_HPP_ #define _COMMON_OWNERDRAWLISTBINARYLED_HPP_ #ifndef _COMMON_BRUSH_HPP_ #include #endif #ifndef _COMMON_BLOCK_HPP_ #include #endif #ifndef _COMMON_OWNERDRAWLIST_HPP_ #include #endif #ifndef _COMMON_PUREBITMAP_HPP_ #include #endif class OwnerDrawListBinaryLed : public OwnerDrawList { public: OwnerDrawListBinaryLed(GUIWindow &parentWnd,HWND hControlWnd,UINT controlID); OwnerDrawListBinaryLed(GUIWindow &parentWnd,const Rect &initRect,int controlID,DWORD style=LBS_NOTIFY|WS_BORDER|LBS_HASSTRINGS|WS_VSCROLL|LBS_OWNERDRAWFIXED|WS_CLIPCHILDREN|WS_CLIPSIBLINGS); virtual ~OwnerDrawListBinaryLed(); OwnerDrawListBinaryLed &operator=(const OwnerDrawListBinaryLed &someOwnerDrawListBinaryLed); protected: virtual WORD handleDraw(const DrawItem &drawItem); virtual WORD handleMeasureItem(MeasureItem &measureItem); virtual LPARAM handleControlColor(PureDevice &pureDevice,Control &wndListBox); virtual void drawEntire(const DrawItem &drawItem); private: enum {BmSel=0,BmUnSel=1}; enum {CellWidth=13,CellHeight=23}; Rect getPlacementRect(int position); void setBitmap(BYTE value); void setBitmap(void); PureBitmap mBlankBitmap; PureBitmap mOneBitmap; PureBitmap mZeroBitmap; PureBitmap mDashBitmap; Font mFont; RGBColor mRGBGray; Brush mGrayBrush; Brush mDisabledBrush; }; #endif