🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #797

Re: How can I take a screen shot?

#797
From: Bashar Termanini
Date: Mon, 14 Jan 2008 12:39
24 lines
1666 bytes
> Try this code instead:
>
> HDC dc = GetDC( NULL );
> if( dc )
> {
>    Image1->Width = Screen->Width;
>    Image1->Height = Screen->Height;
>
>    BitBlt( Image1->Canvas->Handle, 0, 0, Screen->Width, Screen->Height, 
> dc, 0, 0, SRCCOPY );
>    ReleaseDC( NULL, dc );
>
>    Image1->Repaint();
> }
>
> HTH
>
> Jon

This code work fine.

But when the screen resolution is 800 * 600 and a game run at 1024 * 768 
this code capture only 800 * 600 and ignore the rest of the desktop.
Technical Details
Message-ID: <478b5800@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feeder1.cambrium.nl!feed.tweaknews.nl!83.128.0.11.MISMATCH!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <477eabc5@newsgroups.borland.com> <MPG.21e8f11d54bf16ac9899c6@newsgroups.borland.com> <4787e357@newsgroups.borland.com> <4787f042$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9a955b0dfec9583
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Bashar Termanini" <bashar-t@scs-net.org>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <477eabc5@newsgroups.borland.com> <MPG.21e8f11d54bf16ac9899c6@newsgroups.borland.com> <4787e357@newsgroups.borland.com> <4787f042$1@newsgroups.borland.com>
Subject: Re: How can I take a screen shot?
Date: Mon, 14 Jan 2008 14:39:34 +0200
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: 91.144.8.62
Message-ID: <478b5800@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1200314368 91.144.8.62 (14 Jan 2008 04:39:28 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feeder1.cambrium.nl!feed.tweaknews.nl!83.128.0.11.MISMATCH!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail