Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,075 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
i want to put from the memory a picture showing in a window.
i have this code, but do not see it.
var
hw:hwnd;
windc:HDC;
wbmp:tagBitmap;
hbmp:HBitmap;
dc1bmp,dc2bmp:Hdc;
CDC:HDC;
bpic:pointer;
begin
hw:=createwindow;
windc:=getdc(hw);
bpic^:=RGB;
wbmp.bmBits:=BPic;
hbmp:=CreateBitmapIndirect(wbmp);
dc1bmp:=getdc(hbmp);
dc2bmp:=CreateCompatibleDC(dc1bmp);
CDC:=CreateCompatibleDC(windc);
selectobject(cdc,dc2bmp);
bitblt(CDC,00,00,600,400,dc2bmp,0,0,SRCCOPY);
now i have this and i still do not see the pic in my window although b=True
hbmp:=CreateBitmapIndirect(wbmp);
CDC:=CreateCompatibleDC(windc);
GH:=SelectObject(CDC,hbmp);
b:=bitblt(windc,0,0,620,489,CDC,0,0,SRCCopy);
SelectObject(CDC,GH);
DeleteObject(CDC);
there was still missed a procedure, but now i have 4 programs showing the picture in a window.
bye!