38 lines
905 B
C++
38 lines
905 B
C++
#ifndef _OWNER_HPP_
|
|
#define _OWNER_HPP_
|
|
#include <mdiwin/windows.hpp>
|
|
#include <mdiwin/btnlnk.hpp>
|
|
#include <mdiwin/bmplnk.hpp>
|
|
#include <mdiwin/block.hpp>
|
|
#include <mdiwin/string.hpp>
|
|
|
|
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<LinkedButton> mLinkedButtons;
|
|
Block<LinkedBitmap> mLinkedBitmaps;
|
|
};
|
|
|
|
inline
|
|
HINSTANCE OwnerDraw::getHandle(void)const
|
|
{
|
|
return mhLibrary;
|
|
}
|
|
#endif
|