🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How can I take a screen shot?

#799
From: Jonathan Benedicto
Date: Mon, 14 Jan 2008 16:59
16 lines
1661 bytes
Bashar Termanini wrote:
> 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.

I'd guess that the best way to handle this is not to use Screen->Width and 
Screen->Height, but something like this:

int ScreenWidth = GetDeviceCaps( dc, HORZRES );
int ScreenHeight = GetDeviceCaps( dc, VERTRES );

You'll have to put this code after the GetDC call, as it needs the device 
context handle of the screen.

Jon 
Technical Details
Message-ID: <478b94e2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!tudelft.nl!txtfeed1.tudelft.nl!feeder.news-service.com!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> <478b5800@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: "Jonathan Benedicto" <invalid@nobody.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <477eabc5@newsgroups.borland.com> <MPG.21e8f11d54bf16ac9899c6@newsgroups.borland.com> <4787e357@newsgroups.borland.com> <4787f042$1@newsgroups.borland.com> <478b5800@newsgroups.borland.com>
Subject: Re: How can I take a screen shot?
Date: Mon, 14 Jan 2008 11:59:07 -0500
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 99.238.204.170
Message-ID: <478b94e2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1200329954 99.238.204.170 (14 Jan 2008 08:59:14 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!tudelft.nl!txtfeed1.tudelft.nl!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail