Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Does LoadImage(..) work with LOADFROMFILE under NT 4.0 ?

0 views
Skip to first unread message

Dieter Ruscha

unread,
Feb 3, 1998, 3:00:00 AM2/3/98
to

The documentation says that LR_LOADFROMFILE is NOT supported under NT.
I use NT 4.0 with Service Pack 3 and it works fine.

So is the following line supported in other NT 4.0 versions (SP1, SP2?) as
well ? I dont care about 3.51 and earlier versions.

HBITMAP hBitmap = (HBITMAP) ::LoadImage(0, "C:\\MyBitmap.bmp", IMAGE_BITMAP,
0, 0, LR_LOADFROMFILE);


Jerry Coffin

unread,
Feb 3, 1998, 3:00:00 AM2/3/98
to

In article <34d72...@news.rz.uni-passau.de>,
Dieter...@WriteMe.com says...

> The documentation says that LR_LOADFROMFILE is NOT supported under NT.
> I use NT 4.0 with Service Pack 3 and it works fine.
>
> So is the following line supported in other NT 4.0 versions (SP1, SP2?) as
> well ? I dont care about 3.51 and earlier versions.

If memory serves, LR_LOADFROMFILE is supported under all incarnations
of NT 4.

However, if you run into somebody using NT 4 SP2, kindness and decency
toward your customers dictates that you give them a warning that they
really need to do an update immediately. Use of NT 4 SP2 is hazardous
to the health of your data!

--
Later,
Jerry.

The Universe is a figment of its own imagination.

Raymond Chen

unread,
Feb 4, 1998, 3:00:00 AM2/4/98
to

It's a doc bug. LR_LOADFROMFILE does work on NT4 (all versions).
The latest version of the docs has corrected the error.

--
(My return address is intentionally invalid; delete ".---" to get my real address.
My responses are not to be considered official technical support or advice.)

Erick Kobres

unread,
Feb 4, 1998, 3:00:00 AM2/4/98
to

I am in the same quandry. See my post of this question in
microsoft.public.win32.programmer.gdi.

From what I have seen, it sorta works. In fact, if you look at the online
docs at premium.microsoft.com/msdn/library, the NT disclaimer is now gone.
However, I will say this: I have witnessed a problem where sometimes junk
gets loaded instead of the proper bitmap. This only happens a small
percentage of the time on certain machines. The manifestation is usually
that your bitmap is completely black, or it contains the bits from a combo
box drop down button. The LoadImage call does not fail. (!!!) I have not
100% confirmed this to be a bug in Loadimage, but I suspect it may be. I
have a sneaking suspicion it may have to do with the fact that I load DIBs
simultaniously from as many as 10 different threads in my process. I plan
to serialize calls to LoadImage to see if the problem goes away.

There is an set of examples from Microsoft which manually loads a DIB from
disk using C functions. The example's self extracting EXE file is
PARSEBIT.EXE. You should be able to find it somewhere in the MSDN online
lib. (If you can't find it, you can mail me and I will send it to you.)
The functions in this code work fine, but do not automatically give you all
of the goodies like CREATEDIBSECTION and all the 3D stuff. Let me know if
you find out more than me!

-Erick

Dieter Ruscha <Dieter...@WriteMe.com> wrote in article
<34d72...@news.rz.uni-passau.de>...


> The documentation says that LR_LOADFROMFILE is NOT supported under NT.
> I use NT 4.0 with Service Pack 3 and it works fine.
>
> So is the following line supported in other NT 4.0 versions (SP1, SP2?)
as
> well ? I dont care about 3.51 and earlier versions.
>

0 new messages