; im writing from my memory (my own) im skiping some parts of the code as u see

BitmapBits dd ?

; i Fill all this shit that needs to be filled (BITMAPINFOHEADER struct or sth like this)

invoke CreateDIBSection,hdc,addr bi,DIB_RGB_COLORS,addr BitmapBits,0,0
mov hDIB,eax

invoke CreateCompatibleDC,hdc
mov hMemDCDIB,eax

invoke SelectObject,hMemDCDIB,hDIB

;and the problem is here as i think. I wona chenge some pixel or pixels (anything)
mov eax,00000000000000000000000011111111b ; <====Just hipothetical
mov ,eax

; i do not know what now, i tryied SelectObject,hMemDCDIB,hDIB
; not working :(

; AND PLS DONT TELL ME THAT EXAMPLE FOR THIS IS IN EXAMPLE6 LCD
; CUZ I KNOW THIS
Posted on 2002-11-20 06:49:28 by drakoforma
I didnt fully understand your question, but I think you are missing a BitBlt to your main window to make the
changes visible. The DIB and its memory DC are present only in memory and will not be visible until blitted into
the main window.

Try something like this:

GetDC hwndMain
mov hdcMain, eax

BitBlt from hMemDCDIB to hdcMain
Posted on 2002-11-20 06:54:52 by beaster
i wrote only a part of code so i know that i need to BitBlt it.

My problem is probably with the pointer to Bitmap Bits Array.

I dont know if the pointer refers to bits in hMemDCDIB so i need only to Blt it or to hDIB so i need to SelectObject to MemDC once agein



:confused:
Posted on 2002-11-20 07:43:53 by drakoforma
PLEASE DO NOT WRITE IN CAPS !!! :mad:
Posted on 2002-11-20 08:00:28 by JCP
Posted on 2002-11-20 08:07:49 by drakoforma
it works exactly like you wrote, you only need to select the bitmap once, and it could stay selected.
The bitmap memory can be accessed directly with the pointer returned by CreateDIBSection.

I use the code exactly as you have written - works well :|
	push	HWND_DESKTOP

call GetDC
mov hdcPlayer, eax

push hdcPlayer
call CreateCompatibleDC
mov [edi.disp_hdcMemory], eax

...
xor ecx, ecx
lea ebx, [edi.disp_lpBitmap]

push ecx
push ecx
push ebx
push DIB_RGB_COLORS
push eax
push [edi.disp_hdcMemory]
call CreateDIBSection
mov [edi.disp_hbmMemory], eax
...
push [edi.disp_hbmMemory]
push [edi.disp_hdcMemory]
call SelectObject
mov [edi.disp_hbmOld], eax
Posted on 2002-11-20 12:18:41 by beaster
Sorry for spam. I noticed after i wrote the post that ther is Crazy Little Blue Pixel on that black background. :alright:

But i couldnt Delete it becouse i dont have internet.
Posted on 2002-11-21 14:20:10 by drakoforma
so I would recommend this tool :grin: :
Posted on 2002-11-22 03:53:20 by beaster