Article View: comp.windows.ms.programmer
Article #3418Re: Bitmaps
From: Jack A. Zucker
Date: Wed, 26 Jun 1991 12:50
Date: Wed, 26 Jun 1991 12:50
31 lines
1990 bytes
1990 bytes
In article <1991Jun25.182619.150@icd.ab.com>, jaz@icd.ab.com (Jack A.
Zucker) writes:
|> I am using LoadBitmap(hInstance,"bitmapname"); to load bitmap resources.
|> I am trying to do this in the WM_CREATE: case of a child window. I get
|> a NULL back from the function. When I move the LoadBitmap up to the
|> parent's WM_CREATE: it works fine. I've tried setting the segment
|> attributes to preload nondiscardable but to no avail.
|>
I since changed my program to load the bitmaps from a DLL. It still has
the same symptoms. To load the DLL I use:
hLibrary = LoadLibrary("d:\\windev\\jaz\\palette\\bitmap.dll");
To load the bitmap I say:
hBitmap = LoadBitmap(hLibrary,"Pencil"); /* where pencil is the resource */
Once again, The LoadLibrary() and LoadBitmap() only work when done in
the parent window. When called from the child's WM_CREATE: they return
NULL.
Unfortunately this is not mentioned in any of the SDK documentation, nor
is it mentioned in Petzold's book. Am I doing something dumb or is this
just a poorly documented feature ?
| Jack A Zucker {cwjcc,pyramid,decvax,uunet}!jaz@icd.ab.com |
| Allen-Bradley Company, Inc. or ICCGCC::ZUCKER |
| 747 Alpha Drive |
| Highland Hts., OH 44143 Phone(216) 646-4668 FAX: (216) 646-4484 |
Technical Details
Message-ID:
<1991Jun26.125030.13732@icd.ab.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!uunet!icd.ab.com!icd.ab.com!jazReferences:
<1991Jun25.182619.150@icd.ab.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!uunet!icd.ab.com!icd.ab.com!jaz From: jaz@icd.ab.com (Jack A. Zucker) Newsgroups: comp.windows.ms.programmer Subject: Re: Bitmaps Message-ID: <1991Jun26.125030.13732@icd.ab.com> Date: 26 Jun 91 12:50:30 GMT Article-I.D.: icd.1991Jun26.125030.13732 References: <1991Jun25.182619.150@icd.ab.com> Sender: usenet@icd.ab.com (Usenet News Administrator) Reply-To: jaz@icd.ab.com (Jack A. Zucker) Organization: Allen-Bradley Company; Industrial Computer & Communications Group Lines: 31 Nntp-Posting-Host: bird.icd.ab.com