🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: screen capture

#14933
From: Sky
Date: Mon, 28 Jul 2003 06:55
14 lines
1547 bytes
>> GetObject(desk_hdc, sizeof(bm), &bm); // get size of bitmap
GetObject cann't obtains information about a DC
it should be passed a handle to the graphics object of interest. a logical
bitmap, a brush, a font, a palette, a pen, or a device independent bitmap
created by calling the CreateDIBSection function.

why don't you use Screen->Width and Screen->Height?
remove the line GetObject(...
replace this line: membmp = CreateCompatibleBitmap(desk_hdc, Screen->Width,
Screen->Height);

it should be work.

Good Luck!
Technical Details
Message-ID: <3f24c971$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3f23bee4@newsgroups.borland.com> <3f2409b9$1@newsgroups.borland.com> <3f245245@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,3421856959936173
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-28 00:02:17 PST
From: "Sky" <huangc@motic.com.cn>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f23bee4@newsgroups.borland.com> <3f2409b9$1@newsgroups.borland.com> <3f245245@newsgroups.borland.com>
Subject: Re: screen capture
Date: Mon, 28 Jul 2003 14:55:03 +0800
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 210.14.178.251
Message-ID: <3f24c971$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1059375473 210.14.178.251 (27 Jul 2003 23:57:53 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail