-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFlexGUIWorkspace.cpp
64 lines (35 loc) · 1.19 KB
/
FlexGUIWorkspace.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// FlexGUIWorkspace.cpp: implementation of the CFlexGUIWorkspace class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "CPUBench2004.h"
#include "FlexGUIWorkspace.h"
#include "workspacebkdrawer.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CFlexGUIWorkspace::CFlexGUIWorkspace()
{
m_bkDrawer=new CWorkspaceBkDrawer(".\\skindata\\skindata2.bmp");
}
CFlexGUIWorkspace::~CFlexGUIWorkspace()
{
delete m_bkDrawer;
}
void CFlexGUIWorkspace::Draw(CDC* srcDC){
CDC memDC;
memDC.CreateCompatibleDC(srcDC);
CBitmap memBitmap;
memBitmap.CreateCompatibleBitmap(srcDC,m_guiRect.Width(),m_guiRect.Height());
memDC.SelectObject(&memBitmap);
m_bkDrawer->DrawBk(&memDC,&m_guiRect);
for(int i=0; i<m_items.GetSize(); i++){
m_items[i]->DrawItem(&memDC);
}
srcDC->BitBlt(m_guiRect.left,m_guiRect.top,m_guiRect.right,m_guiRect.bottom,&memDC,0,0,SRCCOPY);
}