Article View: borland.public.cppbuilder.nativeapi
Article #2107Re: Bitmap GetObject
From: poojo hackma
Date: Thu, 05 Apr 2007 16:02
Date: Thu, 05 Apr 2007 16:02
26 lines
1748 bytes
1748 bytes
Hi Mr. Gonder.
Thanks for the info!
What should be allocated 84 bytes? My CBitmap object "bitmap" and my BITMAP
structure "BMP" are both heap allocated.
There is an "LPVOID bmBits" in the BITMAP structure. Should I allocate 84
bytes of data, then point the bmBits to it?
typedef struct tagBITMAP {
LONG bmType;
LONG bmWidth;
LONG bmHeight;
LONG bmWidthBytes;
WORD bmPlanes;
WORD bmBitsPixel;
LPVOID bmBits;
} BITMAP;
"Bob Gonder" wrote:
> You just wrote 84 bytes of data to an area that is 24 bytes in size.
> The reason you call it with NULL in the first place, is to allocate
> enough space for the real call, but you never do that.
>
>
Technical Details
Message-ID:
<46151d8d@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feeder2.cambrium.nl!feed.tweaknews.nl!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeeder.wxs.nl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4613f4bc@newsgroups.borland.com> <840a13tv68iop0hgv2keepb1bcrcg5btk9@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,cc67b7c92694fec8 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "poojo hackma" <poojo.com/mail> Newsgroups: borland.public.cppbuilder.nativeapi References: <4613f4bc@newsgroups.borland.com> <840a13tv68iop0hgv2keepb1bcrcg5btk9@4ax.com> Subject: Re: Bitmap GetObject Date: Thu, 5 Apr 2007 11:02:23 -0500 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-RFC2646: Format=Flowed; Original X-Antivirus: avast! (VPS 000730-4, 04/05/2007), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 12.191.89.68 Message-ID: <46151d8d@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1175788941 12.191.89.68 (5 Apr 2007 09:02:21 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feeder2.cambrium.nl!feed.tweaknews.nl!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeeder.wxs.nl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail