🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #2521

Loading Bitmaps from Resource Editor (TPW 1.5)

#2521
From: Erik Arthur
Date: Wed, 06 Jan 1993 20:50
16 lines
1258 bytes
Hello,

I am writing a solitare type game and have a couple of questions about
loading bitmaps from a *.res file.  I have been loading the bitmaps
sequentially into a single variable of type HBitmap when the program
needs to display them.  The problem is that I don't think that the
HBitmap variable is being reused properly.  When I exit the application,
a certain percentage of the windows resources reported by the Program
Manager are gone.  What does the program need to do in order to reuse
the variable?  When I use DeleteObject, the program crashes with a stack
error.  Should I just load all of the bitmaps into an array?
I am using TPW 1.5

Thanks in advance,

Erik Arthur	erik@turtle.psych.umn.edu
Technical Details
Message-ID: <1993Jan6.205044.24863@news2.cis.umn.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!turtle.psych.umn.edu!erik

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!turtle.psych.umn.edu!erik
From: erik@turtle.psych.umn.edu (Erik Arthur)
Subject: Loading Bitmaps from Resource Editor (TPW 1.5)
Message-ID: <1993Jan6.205044.24863@news2.cis.umn.edu>
Sender: news@news2.cis.umn.edu (Usenet News Administration)
Nntp-Posting-Host: turtle.psych.umn.edu
Organization: University of Minnesota, Minneapolis
Date: Wed, 6 Jan 1993 20:50:44 GMT
Lines: 16