-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathGDIDC.cls
More file actions
35 lines (29 loc) · 745 Bytes
/
GDIDC.cls
File metadata and controls
35 lines (29 loc) · 745 Bytes
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
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "GDIDC"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Private m_DC As Long
Public Property Get Handle() As Long
Handle = m_DC
End Property
Private Sub Class_Initialize()
m_DC = CreateCompatibleDC(0)
End Sub
Public Function SelectBitmap(srcBitmap As GDIBitmap)
SelectObject m_DC, srcBitmap.hBitmap
End Function
Private Sub Class_Terminate()
If m_DC <> 0 Then
DeleteDC m_DC
End If
End Sub