From 4d01f5f5096cb4d22c4a7ba17cc82977c7f5f19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Tue, 29 Oct 2013 18:17:04 +0000 Subject: Adopted MirandaG15 plugin First compilable version and 32-bit only. git-svn-id: http://svn.miranda-ng.org/main/trunk@6681 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirandaG15/LCDFramework/src/CLCDBitmap.cpp | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 plugins/MirandaG15/LCDFramework/src/CLCDBitmap.cpp (limited to 'plugins/MirandaG15/LCDFramework/src/CLCDBitmap.cpp') diff --git a/plugins/MirandaG15/LCDFramework/src/CLCDBitmap.cpp b/plugins/MirandaG15/LCDFramework/src/CLCDBitmap.cpp new file mode 100644 index 0000000000..5ce448769d --- /dev/null +++ b/plugins/MirandaG15/LCDFramework/src/CLCDBitmap.cpp @@ -0,0 +1,48 @@ +#include "stdafx.h" +#include "CLCDBitmap.h" + +CLCDBitmap::CLCDBitmap() +{ + m_hBitmap = NULL; +} + +CLCDBitmap::~CLCDBitmap() +{ +} + +bool CLCDBitmap::Initialize() +{ + return true; +} + +bool CLCDBitmap::Shutdown() +{ + return true; +} + +bool CLCDBitmap::Update() +{ + return true; +} + +bool CLCDBitmap::Draw(CLCDGfx *pGfx) +{ + if(m_hBitmap) + { + HDC hCompatibleDC = CreateCompatibleDC(pGfx->GetHDC()); + HBITMAP hOldBitmap = (HBITMAP)SelectObject(hCompatibleDC, m_hBitmap); + + BitBlt(pGfx->GetHDC(), 0, 0, GetWidth(), GetHeight(), hCompatibleDC, 0, 0, SRCCOPY); + + // restores + SelectObject(hCompatibleDC, hOldBitmap); + DeleteDC(hCompatibleDC); + } + return true; +} + +void CLCDBitmap::SetBitmap(HBITMAP hBitmap) +{ + ASSERT(NULL != hBitmap); + m_hBitmap = hBitmap; +} \ No newline at end of file -- cgit v1.2.3