🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Display a bitmap while loading - the answer?

#1579
From: Marcus Jenkins
Date: Tue, 13 Oct 1992 08:32
49 lines
2759 bytes
I have had a few responses to the problem of:

	"How do I get my app. to display a pretty bitmap while
	it's loading up, just like Resource Workshop or Borland's
	Windows IDE?"  (Paraphrasing my posting)

One person suggested that I made sure that my code segments 
weren't PRELOAD, but LOADONCALL.  I changed that, *and* put
WinMain into a teeny-weeny module, all of it's own.  It
still took an age to display the MessageBox() as the first line
in WinMain.  (Borland C++, large model, OWL, by the way).

Another suggestion was to put the bulk of my app. in a DLL.  This
lead me to think of the opposite view.  Why not put the bitmap
displayer and changing the icon to the hourglass into a DLL's
LibMain.  Then call a stub function from that DLL in my code.
Windows, I understand, loads and initialises all DLL's required
by an app. before running the app. itself.

Another solution suggested was to write two executables.  One
little one that displays the bitmap and changes the cursor, and
then WinExec()'s the bulk of the app..

The last two solutions still seem a trifle 'bitty'.  I would like 
to pursue the first line of attack, really (the 'get the segmants
right in the first place' one).  Unfortunately, I'm not certain 
what to do here, since so much implicit work happens in a C++
app. rather than a C one, that I feel that if I start mucking
about with the segments, it might just stop working altogether.

Incidentally, somebody pointed out that there is (TP) source
for an example of how to display a bitmap while loading called
splash.zip of cica.  Unfortunately, this does not tackle the
issue of how to get in there *really* early in the loading
process.   (Nonetheless, I'm sure it will save me some hassle
when I want to change the MessageBox() call to the real bitmap).

By the way, has anybody got any bitmaps of some nice decidous 
trees?  (A sort of old tree, by itself, with an uncluttered
background, and no royalties :-)

 _ _ _
' ) ) )                         Internet: marcusj@apricot.co.uk
 / / / __.  __  _. . . _        UUCP: marcusj@apricot.uucp
/ ' (_(_/|_/ (_(__(_/_/_)_      If all else fails from US, try:  
Marcus Jenkins                  apricot!marcusj@relay.EU.net
Tel: +44 21 472 3002  Fax: +44 21 471 2935
Disclaimer:  Anything I wrote above is, of course, my own view and
             does not in any way represent my employer.
Technical Details
Message-ID: <1992Oct13.083206.21319@apricot.co.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!axion!apricot!marcusj

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!axion!apricot!marcusj
From: marcusj@apricot.co.uk (Marcus Jenkins)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Display a bitmap while loading - the answer?
Message-ID: <1992Oct13.083206.21319@apricot.co.uk>
Date: 13 Oct 92 08:32:06 GMT
Organization: Apricot Computers Limited
Lines: 49