-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunused.cpp
119 lines (94 loc) · 2.2 KB
/
unused.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/* *************************************************************************
** FROM MAP.CPP
** ********************************************************************** */
#if 0
// TEST MRB: For testing coordinate conversions!
{
CPoint pt;
pt.x = rect->left;
pt.y = rect->top;
LogPtToDevPt( &pt );
pt.x = rect->right;
pt.y = rect->bottom;
LogPtToDevPt( &pt );
// Origin stuff LOG--->DEV
pt = m_ptLogOrigin;
LogPtToDevPt( &pt );
pt = m_ptLogOrigin;
pt.y -= 1;
LogPtToDevPt( &pt );
pt = m_ptLogOrigin;
pt.y -= 19;
LogPtToDevPt( &pt );
pt = m_ptLogOrigin;
pt.y -= 20;
LogPtToDevPt( &pt );
pt = m_ptLogOrigin;
pt.y -= 39;
LogPtToDevPt( &pt );
pt = m_ptLogOrigin;
pt.y -= 40;
LogPtToDevPt( &pt );
pt = m_ptLogOrigin;
pt.y -= 41;
LogPtToDevPt( &pt );
pt = m_ptLogOrigin;
pt.y -= 59;
LogPtToDevPt( &pt );
pt = m_ptLogOrigin;
pt.y -= 60;
LogPtToDevPt( &pt );
pt = m_ptLogOrigin;
pt.y -= 61;
LogPtToDevPt( &pt );
// Test
pt.x = 0;
pt.y = 5;
DevPtToLogPt( &pt );
// Multiple conversions
pt.x = m_nWidth - 1;
pt.y = m_nHeight - 1;
DevPtToLogPt( &pt );
LogPtToDevPt( &pt );
DevPtToLogPt( &pt );
LogPtToDevPt( &pt );
}
// END TEST
#endif
#if 0
/*
** Using CImageList to draw transparent bitmaps
*/
// BOOL Draw( CDC* pdc, int nImage, POINT pt, UINT nStyle );
m_pImageList->Draw( pDC, 0, CPoint(0,0), ILD_TRANSPARENT );
m_pImageList->Draw( pDC, 1, CPoint(0,0), ILD_TRANSPARENT );
/*
** Using a CBitmap into a CDC to use BitBlt()
** See books: Petzold, and Animation Techniques in Win32
*/
m_pBitmap->GetObject( sizeof( bm ), &bm );
// Create a mem DC compatible to the display dc
dcMem.CreateCompatibleDC( pDC );
// Select Bitmap into memory DC
pbmOld = dcMem.SelectObject( m_pBitmap );
// BLIT!
pDC->BitBlt( 100, 100,
bm.bmWidth,
bm.bmHeight,
&dcMem,
0, 0,
SRCCOPY );
// Cleanup
dcMem.SelectObject( pbmOld );
#endif
#if 0
/*
CHAR pStr[100];
sprintf( pStr, "rDev: T %d, L %d, B %d, R %d\n",
rDev.top, rDev.left, rDev.bottom, rDev.right );
OutputDebugString( pStr );
sprintf( pStr, "(LOG) T %d, L %d, B %d, R %d\n",
prect->top, prect->left, prect->bottom, prect->right );
OutputDebugString( pStr );
*/
#endif