Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set size of menu font?
Message
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00448746
Message ID:
00449581
Views:
10
>>Can anyone share with me the API calls that would set the menu font on a users machine? Thanks.
Hi Calvin,
>I'll do my best not to lecture you on what you should and shouldn't play with, blah, blah, blah...
>
>Also, I trust that: either you have sufficient experience to know the benefit of distinct Development, Testing and Production environments, OR if you screw things up completely (and in a Production situation) that you will look upon it as a learning opportunity!
>
>Anyway, the font settings you need to change (in NT4) are stored in the registry under a weird looking key for the current user:
> "HKEY_USERS\S-1-...a bloody big number...\Control Panel\Desktop\WindowMetrics"
>double click on MenuFont. But a much simpler key for the default User:
> "HKEY_USERS\.Default\Control Panel\Desktop\WindowMetrics"
>(note the period in front of Default) although, for this key you will probably need to add the MenuFont value.
>
>This does not look like a trivial value to be playing with - the font size 'appears' to be stored in the first byte. With an approximate value of (in hex) 0xFF - nPointSize. I say approximate because I've just spent the last 10 minutes messing with my Display Settings and observing the effect on the registry key. Viz. (for Tahoma):
Point Size     First Byte
>----------      ----------
>    8             0xF5
>    9             0xF4
>    10            0xF3
>    11            0xF1  (note that 0xF2 is missing)
>    12            0xF0
>    13            0xEF
>    14            0xED  (note that 0xEE is missing)
Hopefully, you get the picture. I have no idea how you would programmatically obtain the perverse big number in the key above - but where there is a will, there is usually a queue :-)
>
>Check out the Fox Foundation Classes for code to access / manipulate and create registry keys (probably also some useful bits here on the UT in the Files Section.
>
>Hopefully this was helpful, and not just an academic exercise.

Hi Houston,

As another way (and exercise for you, for me it's too complicated :)), you can follow the suggestions Vlad provided in his FAQ (changing title bar properties).
You can play with this API function to get/set menu fonts.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform