Path: 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 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.