LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I keep my fonts on a menu consistent from one PC to another

Consistent fonts from one PC to another
0 Kudos
Message 1 of 3
(3,521 Views)
Hi,

As far As I know it is not possible to change the font on a menu just like that, the menu will just grab the font from the OS; that is why you see different fonts when running in different machines. There is allways the possibility to look in the wondows SDK to see if you can change the global parameter programmatically....

Hope that helps.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 3
(3,521 Views)
CVI uses the default Windows font for its menus. Manually, you can change the Windows menu font using the control panel Display >> Appearance >> Item >> Menu >> Font.
The menu font is stored in the registry at \HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics\MenuFont.
If you double-click on MenuFont, you see the font name within the binary data. I don't know the format of the binary data, but the following link shows some examples of the data changing with the font size. After the page loads, search for MenuFont.
http://www.faqchest.com/msdn/visbas-l/visba-97/visba-9705/visba-970500/visba97050218_11262.html
You could try an experiment like the following.
1. Use RegReadBinary from the Programmer's Toolbox to read MenuFont on the machine you're developing on.

2. Hard-code that MenuFont value.
3. When your CVI program starts, read and store the current MenuFont value, then use RegWriteBinary to write your hard-coded value.
4. As your CVI program exits, restore the original MenuFont value.

Here's another link discussing CVI using the Windows menu font.
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000A4A00000&UCATEGORY_0=_318_&UCATEGORY_S=0
0 Kudos
Message 3 of 3
(3,521 Views)