#ifndef _OWNER_HPP_ #define _OWNER_HPP_ #include #include #include #include #include class OwnerDraw { public: enum FocusItem{FOCUS,NOFOCUS}; OwnerDraw(); ~OwnerDraw(); HINSTANCE getHandle(void)const; int associate(int ctlID,String &focusUp,String &noFocusUp,String &focusDown,FocusItem focusItem); int handleOwnerButton(int ctlID,LPARAM lParam); void freeButton(int ctlID); int associate(int ctlID,String &bitmapName); void drawBitmap(int ctlID,HWND hWnd,RECT locationRect); void drawBitmap(int ctlID); void freeBitmap(int ctlID); private: int locateLinkedButton(int ctlID); int locateLinkedBitmap(int ctlID); HINSTANCE mhLibrary; Block mLinkedButtons; Block mLinkedBitmaps; }; inline HINSTANCE OwnerDraw::getHandle(void)const { return mhLibrary; } #endif