57 lines
1.3 KiB
C++
57 lines
1.3 KiB
C++
#ifndef _LINKEDBUTTON_HPP_
|
|
#define _LINKEDBUTTON_HPP_
|
|
#include <mdiwin/drawbmp.hpp>
|
|
#include <mdiwin/string.hpp>
|
|
|
|
class LinkedButton : public DrawBitmap
|
|
{
|
|
public:
|
|
enum FocusItem{Focus,NoFocus};
|
|
LinkedButton(void);
|
|
LinkedButton(int ctlID,String &focusUp,String &noFocusUp,String &focusDown,HINSTANCE hLibrary,FocusItem focusItem=Focus);
|
|
LinkedButton(const LinkedButton &someLinkedButton);
|
|
~LinkedButton();
|
|
WORD drawButton(LPDRAWITEMSTRUCT lpControlData);
|
|
int referenceCount(void)const;
|
|
void referenceCount(int newCount);
|
|
WORD operator==(const LinkedButton &someLinkedButton)const;
|
|
WORD operator==(int ctlID)const;
|
|
private:
|
|
void loadButtons(void);
|
|
int mCtlID;
|
|
HBITMAP mhBitmapFocusUp;
|
|
HBITMAP mhBitmapNoFocusUp;
|
|
HBITMAP mhBitmapFocusDown;
|
|
HBITMAP *mlpBitmapDefault;
|
|
String mFocusUpString;
|
|
String mNoFocusUpString;
|
|
String mFocusDownString;
|
|
int mReferenceCount;
|
|
FocusItem mFocus;
|
|
HINSTANCE mhLibrary;
|
|
};
|
|
|
|
inline
|
|
int LinkedButton::referenceCount(void)const
|
|
{
|
|
return mReferenceCount;
|
|
}
|
|
|
|
inline
|
|
void LinkedButton::referenceCount(int newCount)
|
|
{
|
|
mReferenceCount=newCount;
|
|
}
|
|
|
|
inline
|
|
WORD LinkedButton::operator==(const LinkedButton &someLinkedButton)const
|
|
{
|
|
return (mCtlID==someLinkedButton.mCtlID);
|
|
}
|
|
|
|
inline
|
|
WORD LinkedButton::operator==(int ctlID)const
|
|
{
|
|
return mCtlID==ctlID;
|
|
}
|
|
#endif |