Initial Commit

This commit is contained in:
2024-08-07 09:09:36 -04:00
commit ca445435a0
458 changed files with 41370 additions and 0 deletions

46
common/BMPLNK.CPP Normal file
View File

@@ -0,0 +1,46 @@
#include <common/bmplnk.hpp>
LinkedBitmap::LinkedBitmap(void)
: mCtlID(0), mhBitmap(0), mReferenceCount(0), mhLibrary(0)
{
::memset(&mBitmapInfo,0,sizeof(BITMAP));
}
LinkedBitmap::LinkedBitmap(int ctlID,String &bitmapName,HINSTANCE hLibrary)
: mCtlID(ctlID), mReferenceCount(1), mhLibrary(hLibrary), mBitmapName(bitmapName)
{
::memset(&mBitmapInfo,0,sizeof(BITMAP));
loadBitmap(bitmapName,hLibrary);
}
LinkedBitmap::LinkedBitmap(const LinkedBitmap &someLinkedBitmap)
: mCtlID(someLinkedBitmap.mCtlID), mReferenceCount(someLinkedBitmap.mReferenceCount),
mhLibrary(someLinkedBitmap.mhLibrary), mBitmapName(someLinkedBitmap.mBitmapName)
{
::memset(&mBitmapInfo,0,sizeof(BITMAP));
loadBitmap(someLinkedBitmap.mBitmapName,someLinkedBitmap.mhLibrary);
}
LinkedBitmap::~LinkedBitmap()
{
destroy();
}
void LinkedBitmap::destroy(void)
{
if(!isOkay())return;
::DeleteObject(mhBitmap);
mhBitmap=0;
}
WORD LinkedBitmap::drawBitmap(HDC hDC,RECT locationRect)
{
DrawBitmap::drawBitmap(hDC,mhBitmap,locationRect);
return TRUE;
}
WORD LinkedBitmap::drawBitmap(void)
{
DrawBitmap::drawBitmap(mhBitmap);
return TRUE;
}