News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

problems with simple graphics

Started by xandaz, December 08, 2020, 11:15:04 PM

Previous topic - Next topic

xandaz

   I would like to know why the hell this isn't working. i have some examples of it but cant get it to work. Will someone please take a look?

Mikl__


xandaz

   I dont think i understand and some of the files you uploaded seem to be damaged,

daydreamer

isnt it simpler to place all drawing code between GetDC and ReleaseDC and delete objects last in code?

.if wParam==MK_LBUTTON;
invoke CreatePen,PS_SOLID,4,ccolor.rgbResult
invoke SelectObject,hBackDC,eax
invoke DeleteObject,eax;???wrong place deleting object
mov eax,lParam
mov ebx,eax
movzx eax,ax
shr ebx,16
invoke LineTo,hBackDC,eax,ebx
invoke GetClientRect,hCanvas,addr rect
invoke InvalidateRect,hCanvas,addr rect,TRUE
.endif




https://docs.microsoft.com/en-us/windows/win32/gdi/drawing-with-the-mouse
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

xandaz

    Thanks... i got it to work but ccolor.rgbResult isn't returning any values... Why is that?

xandaz

   Sorry. My bad. I was creating the bitmap with the compatible dc instead of the window dc. Thats why it came in black and white. Thanks y'all