Files
Work/mdiwin/BMPLNK.CPP
2024-08-07 09:16:27 -04:00

37 lines
850 B
C++

#include <mdiwin/bmplnk.hpp>
LinkedBitmap::LinkedBitmap(void)
: mCtlID(0), mhBitmap(0), mReferenceCount(0), mhLibrary(0)
{
}
LinkedBitmap::LinkedBitmap(int ctlID,String &bitmapName,HINSTANCE hLibrary)
: mCtlID(ctlID), mReferenceCount(1), mhLibrary(hLibrary), mBitmapName(bitmapName)
{
loadBitmap();
}
LinkedBitmap::LinkedBitmap(const LinkedBitmap &someLinkedBitmap)
: mCtlID(someLinkedBitmap.mCtlID), mReferenceCount(someLinkedBitmap.mReferenceCount),
mhLibrary(someLinkedBitmap.mhLibrary), mBitmapName(someLinkedBitmap.mBitmapName)
{
loadBitmap();
}
LinkedBitmap::~LinkedBitmap()
{
if(mhBitmap)::DeleteObject(mhBitmap);
}
WORD LinkedBitmap::drawBitmap(HDC hDC,RECT locationRect)
{
DrawBitmap::drawBitmap(hDC,mhBitmap,locationRect);
return TRUE;
}
WORD LinkedBitmap::drawBitmap(void)
{
DrawBitmap::drawBitmap(mhBitmap);
return TRUE;
}