The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: OceanJeff32 on October 09, 2005, 04:32:43 AM

Title: Another Bitmap Question...yes Windows GDI
Post by: OceanJeff32 on October 09, 2005, 04:32:43 AM
Once again from the confusing world of Windows GDI, comes a question from MASM programmers about BITMAPS!!   :boohoo:

:lol

Please check out this attachment if you are interested in helping, I'm trying to BitBlt the HAPPY.BMP to the screen.

Later, and thanks,

Jeff C
:eek

[attachment deleted by admin]
Title: Re: Another Bitmap Question...yes Windows GDI
Post by: Tedd on October 10, 2005, 10:33:19 AM
Here's one I made earlier.. :wink

(It uses LoadBitmap, instead of LoadImage, but they both obtain the bitmap from the resources, so there's little difference.)


[attachment deleted by admin]
Title: Re: Another Bitmap Question...yes Windows GDI
Post by: Vortex on October 10, 2005, 04:15:26 PM
Hi Jeff,

Nice example. Why do you need to declare the API functions with the EXTERN statement when include files from the masm32 package are available?
Title: Re: Another Bitmap Question...yes Windows GDI
Post by: Vortex on October 10, 2005, 06:13:05 PM
Checking the win32.hlp , I found this definition :

QuoteHANDLE LoadImage(

    HINSTANCE hinst,    // handle of the instance that contains the image
    .
    .

Maybe, your code should contain something like PUSH HINST instead of PUSH MEMDC2

invoke LoadImage,hInstance,ADDR filename,IMAGE_BITMAP,0,0,LR_LOADFROMFILE

You can check the attachment for a simple example.

[attachment deleted by admin]