todd@ivucsb.sba.ca.us (Todd Day) (12/17/90)
I am trying to add a 10 character LCD number font to one of my applications. However, I can't seem to get it to work. I've linked it into my application via the resource compiler (I've found some of the strings from the font header in my .EXE, so I know it's there). However, whenever I try to use CreateFont to grab it, it comes back with some other font. I really hate the way Windows handles fonts. Why doesn't it just tell you it couldn't find the font you were looking for instead of handing you what you didn't want in the first place? I don't want to compile it into a system-wide loadable font. I just want it to go with my application. Ahhhh... I think it just hit me... Do I have to somehow load it into system font area? Will Windows be able to find it in my resource area? Help! -- Todd Day | todd@ivucsb.sba.ca.us | ucsbcsl!ivucsb!todd ** Ask me about the August, 1991, Gold Rush mini-rallye! **
chrisg@microsoft.UUCP (Chris GUZAK) (12/30/90)
In article <1990Dec17.043126.8415@ivucsb.sba.ca.us> todd@ivucsb.sba.ca.us (Todd Day) writes: >I am trying to add a 10 character LCD number font to one >of my applications. However, I can't seem to get it to >work. I've linked it into my application via the resource >compiler (I've found some of the strings from the font Just because your font is in your exe doesn't mean it is available for use in the system. You need to AddFontResource() the thing. You might even be able to AddFontResource(GetModuleName(hInst)) (wrong syntax, but you get the idea). It is probably a better idea to keep the font file seperate. If you wan't to make sure you got the font you asked for (instead of relying on the font mapper (randomizer)) use GetFaceName() (or whatever it is called). Check that against the lfFaceName field you passed in. Chris Guzak