2015-10-25 19:20:23 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-08-04 12:58:40 +00:00
|
|
|
class CBitmapPicture :
|
|
|
|
public CWindowImpl <CBitmapPicture>
|
2015-10-25 19:20:23 +00:00
|
|
|
{
|
|
|
|
public:
|
2020-08-04 12:58:40 +00:00
|
|
|
BEGIN_MSG_MAP(CBitmapPicture)
|
|
|
|
MESSAGE_HANDLER(WM_PAINT, OnPaint);
|
|
|
|
END_MSG_MAP()
|
2015-10-25 19:20:23 +00:00
|
|
|
|
2020-08-04 12:58:40 +00:00
|
|
|
CBitmapPicture();
|
|
|
|
|
|
|
|
LRESULT OnPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL &/*bHandled*/);
|
|
|
|
|
|
|
|
bool SetIcon(LPCWSTR lpszResourceName, uint32_t nWidth, uint32_t nHeight);
|
|
|
|
void SetBitmap(LPCWSTR lpszResourceName);
|
|
|
|
void SetBackroundBrush(HBRUSH brush);
|
2015-10-25 19:20:23 +00:00
|
|
|
|
|
|
|
private:
|
2020-08-04 12:58:40 +00:00
|
|
|
CBitmapPicture(const CBitmapPicture&);
|
|
|
|
CBitmapPicture& operator=(const CBitmapPicture&);
|
|
|
|
|
|
|
|
bool CBitmapPicture::SetBitmap(HBITMAP hBitmap);
|
2015-10-25 19:20:23 +00:00
|
|
|
|
2020-08-04 12:58:40 +00:00
|
|
|
int m_nResourceID;
|
|
|
|
std::wstring m_strResourceName;
|
|
|
|
uint32_t m_IconWidth, m_IconHeight;
|
|
|
|
bool m_ResourceIcon;
|
|
|
|
BITMAP m_bmInfo;
|
|
|
|
CBitmap m_hBitmap;
|
|
|
|
CBrush m_BackgroundBrush;
|
2021-03-17 09:28:07 +00:00
|
|
|
};
|