Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WINDOWS default fonts
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00043104
Message ID:
00043491
Vues:
30
>>>Hi everybody!
>>>
>>>Does anybody know, how I could determine the Windows 95 (or NT4.0) default font properties? (name, size, color) (for menus and message box?)
>>>I checked winapi32 functions like getsysmetrics, but I didnot find anything for this.
>>>
>>>Any advice?
>>>
>>>TIA
>>>
>>>BB
>>
>>Hi Bela,
>>
>>The Windows fonts definitions are stored in the registry under the HKEY_CURRENT_USER\ControlPanel\desktop\WindowMetrics key. It's stored as binary data, so you'll have to translate it. Byte 0 is the font size, bytes 8 and 9 the style. The font name begins at byte 18. All told, there are 50 bytes associated with this information. You can use the registry class that comes with VFP 5 is retrieve this information.
>>
>>HTH,
>>
>>George
>
>Thaks! I have found as you wrote.
>
>I consult a man, who told that this is a C++ LOGFONT structure, stored to there.
>
>I looked the registry data, and as I saw the font name is double byte character string. How can it be translated to single byte string?
>
>BB

Bela,

Look at the STRCONV() function in the VFP help file. If you want to see an example, look in the Knowledge Base here, at the posting Michel made on converting single to double byte strings (UNICODE). It's in the WIN32 and other APIs section. Thanks, Michel.

George
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform