<BORLAND 5.02> "PRINT SCREEN"

0

witam,
mam pytanko jak mozna wrzucic do bufora pamieci to co jest na ekranie? Probowalem w ten sposob ale to nic nie dalo :(

hdc = BeginPaint (hwnd, &ps);
hMemory1=CreateCompatibleDC(hdc);
hdcdesktop=GetDC(hdesktop);
SelectObject(hMemory1,hBitmap);
PatBlt(hMemory1,0,0,1279, 1023,WHITENESS); //DC, left, top, width, height, operation code
BitBlt(hMemory1,0,0,1279,1023,hdcdesktop,0,0,SRCCOPY);

jesli ktos ma jakis pomysl, chętnie wyslucham.

0

A może tak:

TCanvas &PulpitCanvas = *new TCanvas();
Graphics::TBitmap *Bmp = new Graphics::TBitmap;

PulpitCanvas.Handle = GetDC(0);
Bmp->Width = Screen->Width;
Bmp->Height = Screen->Height;
Bmp->Canvas->CopyRect(Rect(0, 0, Bmp->Width, Bmp->Height), &PulpitCanvas,
                      Rect(0, 0, Bmp->Width, Bmp->Height));

   Bmp->SaveToFile("c:\\ekran.bmp");
   ReleaseDC(0, PulpitCanvas.Handle);

delete &PulpitCanvas;
delete Bmp;

1 użytkowników online, w tym zalogowanych: 0, gości: 1