fillchar(img,sizeof(img),255);
setpixel(hc,0,0,clwhite);
v := GetDiBits( hc, // handle of device context
hb, // handle of bitmap
0, // first scan line to set in destination bitmap
100, // number of scan lines to copy
@img, // address of array for bitmap bits
lpbi, // address of structure with bitmap data
DIB_RGB_COLORS // RGB or palette index
);
move(img,img2,sizeof(img));
for xf := 0 to 99 do
for yf := 0 to 99 do begin
dec(img2[xf,yf].r,100);
dec(img2[xf,yf].g,100);
dec(img2[xf,yf].b,100);
end;
//setdiBits(h,hb,0,100,@img2,lpbi,DIB_RGB_COLORS);
selectobject(hc,hbitmapold);
deleteobject(offscrbmp);
DeleteDC(hc);
v := StretchDIBits(
h, // handle of device context
0, // x-coordinate of upper-left corner of dest. rect.
0, // y-coordinate of upper-left corner of dest. rect.
100, // width of destination rectangle
100, // height of destination rectangle
0, // x-coordinate of upper-left corner of source rect.
0, // y-coordinate of upper-left corner of source rect.
100, // width of source rectangle
100, // height of source rectangle
@img2, // address of bitmap bits
lpbi, // address of bitmap data
DIB_RGB_COLORS , // usage
SRCCOPY // raster operation code
);
releaseDC(0,h);
end;
Ca lit mais ça n'écrit pas dessus ;
Avez vous des tuyaux ???????
Merci beaucoup.
A quoi sert GetDesktopWindow ??? en utilisant GetDC(0) ça marche
Vincent Burel
"Sivaller" wrote in message news:452d259d$0$25953$
A quoi sert GetDesktopWindow ??? en utilisant GetDC(0) ça marche
Et bien si vous lisez la doc :
GetDesktopWindow ---------------------------------- The GetDesktopWindow function returns a handle to the desktop window. The desktop window covers the entire screen. The desktop window is the area on top of which all icons and other windows are painted.
HWND GetDesktopWindow(VOID);Parameters This function has no parameters.
Return Values : The return value is a handle to the desktop window.
Alors que GetDC renvoie un Device Contexte, GetDesktopWindow renvoi un handle de fenetre.
VB
"Sivaller" <sivaller.ni@voila.fr> wrote in message
news:452d259d$0$25953$ba4acef3@news.orange.fr...
A quoi sert GetDesktopWindow ???
en utilisant GetDC(0) ça marche
Et bien si vous lisez la doc :
GetDesktopWindow
----------------------------------
The GetDesktopWindow function returns a handle to the desktop window. The
desktop window covers the entire screen. The desktop window is the area on
top of which all icons and other windows are painted.
HWND GetDesktopWindow(VOID);Parameters
This function has no parameters.
Return Values :
The return value is a handle to the desktop window.
Alors que GetDC renvoie un Device Contexte, GetDesktopWindow renvoi un
handle de fenetre.
"Sivaller" wrote in message news:452d259d$0$25953$
A quoi sert GetDesktopWindow ??? en utilisant GetDC(0) ça marche
Et bien si vous lisez la doc :
GetDesktopWindow ---------------------------------- The GetDesktopWindow function returns a handle to the desktop window. The desktop window covers the entire screen. The desktop window is the area on top of which all icons and other windows are painted.
HWND GetDesktopWindow(VOID);Parameters This function has no parameters.
Return Values : The return value is a handle to the desktop window.
Alors que GetDC renvoie un Device Contexte, GetDesktopWindow renvoi un handle de fenetre.