🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #1728

LoadBitmap help resummarization of help needed

#1728
From: Brian K. W. Hook
Date: Tue, 19 Mar 1991 13:49
40 lines
1994 bytes
Alright, I looked over my code a bit more and did a lot more thorough
tracing, and this is what I have found out:

1.  The program dies IN CreateWindow(), but not until it passes the message
WM_CREATE to MainWndProc.  When I used TDW and did an F7 or F8 at
CreateWindow(), I would get an Exception 13, code -4.  However, if I did an
F4 (trace up to) at switch WM_CREATE:, it would run just fine to that
point, but immediately exception out at:

hBitMap=LoadBitmap(hInst,"boom");

2.  For some reason, substituting in a standard Windows bitmap and using:

hBitMap=LoadBitmap(NULL,"OLD_BITMAP");  // OLD_BITMAP for demonstrative
					// purposes

Still gets the error when I thought that it would get rid of the error.
Hmm...

3.  When I comment out LoadBitmap() from WM_CREATE, the program works fine.

Anyway, I can't seem to find the problem still.  My RC file has the
following as the last line:

boom BITMAP BOOM.BMP

4.  BOOM.BMP *IS* in the current directory.  RC works just fine.

5.  As before, I am using a VGA, 386-33, Win 3.00, Borland C++ 2.00, Small
memory model, Windows .EXE, TDW for debugging, 8MB of RAM, debug info on,
optimizations off.

6.  Could I be running out of memory locally or something?  The
documentation on LoadBitmap is REAL lame.  Where does it takes its memory
from?  The global heap?  Local heap?  Stack?  How do I change these in the
IDE?

Help would be appreciated,

Brian
Technical Details
Message-ID: <27518@uflorida.cis.ufl.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!gatech!uflorida!reef.cis.ufl.edu!jdb
References: <1991Mar19.103524.8474@cs.ubc.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!gatech!uflorida!reef.cis.ufl.edu!jdb
From: jdb@reef.cis.ufl.edu (Brian K. W. Hook)
Newsgroups: comp.windows.ms.programmer
Subject: LoadBitmap help resummarization of help needed
Summary: Also, could I be running out of memory?
Message-ID: <27518@uflorida.cis.ufl.EDU>
Date: 19 Mar 91 13:49:31 GMT
References: <1991Mar19.103524.8474@cs.ubc.ca>
Sender: news@uflorida.cis.ufl.EDU
Organization: UF CIS Dept.
Lines: 40