Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

screen capture ...

Status
Not open for further replies.

iza

Programmer
Apr 4, 2000
1,804
FR
where could i find a good doc/ref on how to code an app that would capture the screen and paste the captured bitmap in a specified window - i've been looking in msdn workshop, and the msdn library, and searched thru the posts here, and the faqs ... - or could someone help ?

here's what i got so far :
// to capture the screen
HDC hdcScreen = CreateDC("DISPLAY", NULL, NULL, NULL);
HDC hdcCompatible = CreateCompatibleDC(hdcScreen);
HBITMAP hbmScreen = CreateCompatibleBitmap(hdcScreen,
GetDeviceCaps(hdcScreen, HORZRES),
GetDeviceCaps(hdcScreen, VERTRES));
HGDIOBJ image=SelectObject(hdcCompatible,hbmScreen);
if (BitBlt(hdcCompatible,
0, 0,
200, 200,
hdcScreen,
0,0,
SRCCOPY))

{
here is the problem !!! i want an image on the calling window to update with the values that have just been copied with BitBlt ...
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top