Re: Windows DIB?
------=_NextPart_000_0016_01C000A4.D9B18420
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Actually memBM =3D c_func(iCreateCompatibleBitmap,{hdc, 197, 275}) isnt =
even needed.
Original Message:
To display a DIB (device independant bitmap) in Windows (95,98,2K,NT)
If I use the below Code (My_Code) what if any compatibility issue =
might I run into?
From Microsoft SDK
HDC memDC =3D CreateCompatibleDC ( hDC );
HBITMAP memBM =3D CreateCompatibleBitmap ( hDC );
SelectObject ( memDC, memBM );
=20
This Works in my program on my Machine.
My_Code:
constant SRCCOPY =3D #CC0020
atom memDC, memBM, hBitmap, Bitmap_file, selBmp, ShowBmp
Bitmap_file =3D allocate_string("eumans.bmp")
memDC =3D c_func(iCreateCompatibleDC, { hdc })
memBM =3D c_func(iCreateCompatibleBitmap,{hdc, 197, 275})
hBitmap =3D c_func(iLoadImage,=20
{NULL, Bitmap_file, IMAGE_BITMAP, 197, 275, =
LR_LOADFROMFILE})
selBmp =3D c_func(iSelectObject,{memDC, hBitmap})
ShowBmp =3D c_func(iBitBlt, {hdc,=20
415, -- x placement
220, -- y placement
197, -- already know =
width
275, -- already know =
height
memDC,
0,=20
0,
SRCCOPY} )
Thanks in advance
euman at bellsouth.net
------=_NextPart_000_0016_01C000A4.D9B18420
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Actually memBM =3D=20
c_func(iCreateCompatibleBitmap,{hdc, 197, 275}) isnt even =
needed.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DArial size=3D2>Original Message:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><BR> </DIV>
<DIV><FONT face=3DArial size=3D2>To display a DIB (device independant =
bitmap) in=20
Windows (95,98,2K,NT)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>If I use the below Code (My_Code) =
what if any=20
compatibility issue might I run into?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D1> From =
Microsoft=20
SDK</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D1> HDC memDC =3D =
CreateCompatibleDC=20
( hDC );<BR> HBITMAP memBM =3D =
CreateCompatibleBitmap ( hDC=20
);<BR> SelectObject ( memDC, memBM =
);<BR></FONT><FONT=20
face=3DArial size=3D2> </FONT></DIV>
<DIV><FONT face=3DArial size=3D2> <U>This =
Works in my=20
program on my Machine.</U></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>My_Code:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>constant SRCCOPY =3D =
#CC0020<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>atom memDC, memBM, hBitmap, =
Bitmap_file, selBmp,=20
ShowBmp</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Bitmap_file =3D=20
allocate_string("eumans.bmp")</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> =
memDC =3D=20
c_func(iCreateCompatibleDC, { hdc })<BR> =
memBM =3D=20
c_func(iCreateCompatibleBitmap,{hdc, 197,=20
275})<BR> hBitmap =3D c_func(iLoadImage, =
=
{NULL, Bitmap_file, IMAGE_BITMAP, 197, 275, =
LR_LOADFROMFILE})</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> selBmp =
=3D=20
c_func(iSelectObject,{memDC, =
hBitmap})<BR> =20
ShowBmp =3D c_func(iBitBlt, {hdc,=20
=
415, -- x=20
=
220, -- y=20
=
197, -- already know=20
=
275, -- already know=20
=
=
0,=20
=
=
SRCCOPY} )</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks in advance</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
=
<DIV><FONT face=3DArial =
------=_NextPart_000_0016_01C000A4.D9B18420--
|
Not Categorized, Please Help
|
|