NASM Forum > Example Code
Windows GDI animation with semitransparent pixels and custom shape 64 bits
BalticMusicFan:
I had fallen into too much bogus information when I tried to create a program for the first time that draws something to the screen. To decrease your chance to get stuck with this topic, I am sharing code that does more than showing sample picture within rectangle. Since source code is way larger than I would like to scroll over here, it is available at https://pastebin.com/nLQgpNqn .
Some myths I would like to debunk with this code:
* It is required to write your own Window Procedure in order to create a window;
* To create a window with complex shape, you are stuck with CreateRectRgn/CombineRgn functions;
* Reserving one RGB colour as transparent is required to achieve transparency effects. If you are only on 32 bit OS or not very friendly with assembler, you might still see some hints how to deal with Windows graphics some other way.
Frank Kotler:
Thanks, BalticMusicFan!
Nasm's Windows users need all the help they can get from each other!
Best,
Frank
avcaballero:
Hello. I couldn't compile it with
nasm.exe -w-orphan-labels "messageboxa x64.asm" -f win64 -o "messageboxa x64.obj"
GoLink.exe "messageboxa x64.obj" "kernel32.dll" /dynamicbase /entry start /largeaddressaware /nxcompat /fo "messageboxa x64.exe"
I'v got the next error: nasm: fatal: unable to open input file `messageboxa x64.asm'
Thank you
Frank Kotler:
Hi Alfonso,
Filename on effing pastebin seems to end in "asm.asm". Lemme see if I can attach it here... Thanks for the heads-up!
Best,
Frank
avcaballero:
Hello, Frank. Great work, as ever :) It was my fault naming the file ???
Navigation
[0] Message Index
[#] Next page
Go to full version