Article View: borland.public.cppbuilder.nativeapi
Article #444Re: bds2006 vcl, CreateCompatibleBitmap, EOutOfResources
From: Bob Gonder
Date: Tue, 15 Apr 2008 22:10
Date: Tue, 15 Apr 2008 22:10
31 lines
1992 bytes
1992 bytes
dhoke wrote: >Given the details below, what resource is insufficient? > Result := GDICheck(CreateCompatibleBitmap(ScreenDC, bmWidth, bmHeight)) >The width/height are 4000/2500. The desktop screen setup >has dual monitors with both set at 1280x1024, 32-bit color quality. So, you are creating a BMP of 4000 x 2500 x 4 bytes, or 40 MB. >The code fails with the GDICheck()) resulting in an EOutOfResources >exception (the GetLastError() from CreateCompatibleBitmap() (as viewed with >debugger in GDIError(), called from GDICheck()) appears to be 8.) http://support.microsoft.com/kb/928726 CAUSE This issue occurs if the Graphical Device Interface (GDI) has insufficient memory. System Error Codes: http://msdn2.microsoft.com/en-us/library/ms681381(VS.85).aspx GDI Heap: http://support.microsoft.com/kb/125699 MS Bug: http://support.microsoft.com/kb/319740 Another one: http://support.microsoft.com/kb/299533 Those and more.... http://search.msdn.microsoft.com/Default.aspx?brand=Msdn&refinement=&locale=en-us&lang=&query=gdi
Technical Details
Message-ID:
<1d8a041556ifu53e5i6fm8atmqksriirvs@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.isoc.lu!newsgroups.borland.com!not-for-mailReferences:
<480512cb$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,88848d407d0d2500 X-Google-Attributes: gid10cc67,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: bds2006 vcl, CreateCompatibleBitmap, EOutOfResources Date: Tue, 15 Apr 2008 15:10:03 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <1d8a041556ifu53e5i6fm8atmqksriirvs@4ax.com> References: <480512cb$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.144.72 X-Trace: newsgroups.borland.com 1208297401 67.77.144.72 (15 Apr 2008 15:10:01 -0700) Lines: 33 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.isoc.lu!newsgroups.borland.com!not-for-mail