Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
'Demonstrates that a memory DC comes equipped with a 1x1 bitmap
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "Win32API.inc"
Function PBMain() As Long
Local hDesktopDC, hMemoryDC, hBitmap As DWord, bm As Bitmap
'create compatible memory DC, with bitmap selected into it
hMemoryDC = CreateCompatibleDC(hDesktopDC)
hBitMap = GetCurrentObject(hMemoryDC, %OBJ_BITMAP)
If hBitMap Then
GetObject hBitMap, SizeOf(bm), bm
MsgBox Str$(bm.bmWidth) + Str$(bm.bmHeight)
End If
End Function
'gbs_00939
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm