The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Norad00 on April 07, 2005, 03:36:34 PM

Title: Background image from resource
Post by: Norad00 on April 07, 2005, 03:36:34 PM
Hi all,

In Visual Basic, you can set a window to have an image as the background. Is this possible using asm?
Title: Re: Background image from resource
Post by: P1 on April 07, 2005, 04:12:24 PM
Norad00,

Check here for a general use example.

C:\Masm32\EXAMPLE4\STRCHBLT

Start going through your Help files and tutorials, you will come up to speed quicker if you do.

Googling is a good thing too!    :U

Regards,  P1  :8)
Title: Re: Background image from resource
Post by: Faiseur on April 07, 2005, 04:13:25 PM
Naturally. If your image is a bitmap, use for example:


in WM_INITDIALOG


Invoke LoadBitmap, hInstance, yourbitmapinressource
Mov hBitmap, Eax
invoke CreatePatternBrush,eax
mov hBrushD,eax


in WM_CTLCOLORDLG


mov eax,hBrushD
Ret



In attachment this is a good example (it is not from me).

   

[attachment deleted by admin]