2015-10-25 19:20:23 +00:00
|
|
|
/****************************************************************************
|
|
|
|
* *
|
2015-11-10 05:21:49 +00:00
|
|
|
* Project64 - A Nintendo 64 emulator. *
|
2015-10-25 19:20:23 +00:00
|
|
|
* http://www.pj64-emu.com/ *
|
|
|
|
* Copyright (C) 2012 Project64. All rights reserved. *
|
|
|
|
* *
|
|
|
|
* License: *
|
|
|
|
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
|
|
|
#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;
|
2015-10-25 19:20:23 +00:00
|
|
|
};
|