Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setup fonts?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00265937
Message ID:
00267135
Vues:
23
>>When we install some fonts for our system on a new windows computer, the window's fonts don't automatically get updated. We have to
> physically go into the fonts folder and then go into the application to get them to appear correctly. We are using the Visual Foxpr Setup
Wizard
> to create our setup. Is there anything we can do programmatically to make this happen. We've seached quite a bit, and we've even looked
> through our TechNet CDs.
> >
> >Any help would be appreciated!!
> >
>> Installing fonts is really not possible if done in VFP code. The installation >process calls for a call to EnumFontFamilies() which requires a
>> callback function.
>>
>> OTOH, you can make the font(s) available to your application by calling >AddFontResource() in the Win32api. Ed Rauh has posted an
FAQ in
>> the Win32API and other APIs section. What you could do is at the start of your >code, add the font resource following the steps in Ed's
FAQ.
>> It would then be available to it.
>>
>> In addition to what Ed presents, I'd also recommend that you remove the >resource when the application shuts doing using:
>>
>> DECLARE INTEGER RemoveFontResource IN WIN32API;
>> STRING @lpfontfile
>> * lcfontfile is the name of the font file
>> = RemoveFontResource(@lcfontfile)
>
>
>
>Hello. John posted the original message in my behalf. AddFontResource executes fine, but it doesn't register the font. I copy the font into the
C:\Windows\Fonts directory, execute this API function(which returns 1, meaning it was successful), and VFP still substitutes my font for
another. I'm using the font with @SAY's right now. Any idea what I've done wrong, or anything else I can try? Thank you very much.
>
>
>Product Developer
>Microworks POS Solutions, Inc.

> There are two possibilities. One is that your font is a member of the same >"font family" as the one that is being substituted. The other is that
> you're neglecting to notify all open applications, via SendMessage, of the >change. I've used this function myself and have supervised its use in
> other development environments. I've never encountered the first possibilty >and never seen it fail when SendMessage was properly executed.

Excuse my ignorance, but could you spell out what I need to send to SendMessage to inform them? The documentation in MSDN is quite verbose. :-> Thanks.


> A third possibility does come to mind. I've only utilized this with the FoxPro >report designer. So what is going on with VFP interally with
> @...SAY is unknown to me.

Possible, I guess. If I could simply open up 'C:\WINDOWS\FONTS\' in a window and then close it without the installer seeing, that would work great. I'd think there'd be a function that could be called to do whatever doing that does(probably updating the registry, I'd guess). Thank you for your help.
Derek J. Kalweit
Software Engineer
Microworks POS Solutions, Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform