How can I get a Pointer on GDI? using Lock on DirectX?. Am not Using DirectX now am trying to use GDI32 (just GDI.....GDI....GDI repeating saying GDI untill 1000 times )
GetObject returns (among other things) a pointer to the raw data of a bitmap object.
Eoin has some excellent examples on what you're trying to do - http://www.redbrick.dcu.ie/~eoin/programs.htm
The "Back Buffer Shell" example would be a good one to start with.
Eoin has some excellent examples on what you're trying to do - http://www.redbrick.dcu.ie/~eoin/programs.htm
The "Back Buffer Shell" example would be a good one to start with.
:stupid: But I still confuse, if I must Use GetDIB can somebody made me a funtion called GDILock ?
If you want to modify a bitmap, all you have to do is:
You can create a blank DIB bitmap using a snippet from Eoin's tuts, or load a bitmap from a resource or file using LoadImage.
But I still confuse if I must Use GetDIB can somebody made me a funtion called GDILock ?
You don't understand the API so you ask us to make one to your specifications, is that it?
I have to wonder if you actually read those tutorials I told you about. If not: Study them, NOW!
.data
BitmapInfo BITMAP <>
.code
invoke GetObject,hBitmap,sizeof BITMAP,addr BitmapInfo
mov edi,BitmapInfo.bmBits ; Now edi points to the color values for all the pixels
; Fill the bitmap with black (example)
mov eax,BitmapInfo.bmWidthBytes
mul BitmapInfo.bmHeight
mov ecx,eax
xor eax,eax
rep stosb
You can create a blank DIB bitmap using a snippet from Eoin's tuts, or load a bitmap from a resource or file using LoadImage.
But I still confuse if I must Use GetDIB can somebody made me a funtion called GDILock ?
You don't understand the API so you ask us to make one to your specifications, is that it?
I have to wonder if you actually read those tutorials I told you about. If not: Study them, NOW!
I have read the tutorial. Thats What I want sire. I want to modify a Bitmap. now the I can obtain the Pointer and Also the color.
:alright:
:alright: