🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Reading icon files and CreateIcon

#1138
From: Ken Fishkin
Date: Fri, 25 Jan 1991 17:52
17 lines
1281 bytes
In article <155@cf_su20.cf_su10.Sbi.COM> nee@cf_su20.Salomon.Com (Robert Nee) writes:
>Has anyone been able to use the CreateIcon call with
>success?  Has anyone been able to successfully read
>.ico files and know of some pitfalls I should be aware
>of?  

I spent a week or two of heartache on exactly this problem,
and finally found that:

        It turns out that the call to DisplayIcon will cause your
program to exit with an "unrecoverable application error" bomb unless the
height and width of the icon, as specified in the call to CreateIcon,
are _exactly_ that expected by your display (in our case, both must be 32).
You can have a different number of bits/pixel, but the height and width
can not differ.
        This limitation, needless to say, is undocumented.
 
Technical Details
Message-ID: <1991Jan25.175212.11268@pixar.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!uupsi!pixar!fishkin
References: <155@cf_su20.cf_su10.Sbi.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!uupsi!pixar!fishkin
From: fishkin@pixar.uucp (Ken Fishkin)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Reading icon files and CreateIcon
Message-ID: <1991Jan25.175212.11268@pixar.uucp>
Date: 25 Jan 91 17:52:12 GMT
References: <155@cf_su20.cf_su10.Sbi.COM>
Sender: news@pixar.uucp
Organization: Pixar -- Point Richmond, California
Lines: 17
Nntp-Posting-Host: madison