LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Menu bar height ?

I have a menu bar in my main panel. What is its height ?
I don't see it in GetMenuBarAttribute. It's about 20 pixels but how do I find it programmatically
?

Thanks for all the previous answers.
--
Guillaume Dargaud
http://www.gdargaud.net/
"Operator ! Give me the number for 911 !" - Homer Simpson.
0 Kudos
Message 1 of 5
(4,307 Views)
Guillaume,

The height of the menubar is given by the following expression:

height = GetSystemMetrics(SM_CYMENU) + 2;

(you'll need to include windows.h to be able to run this).

Luis
NI
0 Kudos
Message 2 of 5
(4,307 Views)
Hi Guillaume,

I don't think there is any way to change the height of the menu bar. CVI menu bars are inherited from the OS like most applications. So it will use the system wide settings and it will look like any other menu bar in the system.

You may to look into a a toolbar to have more control on how things look. Here is a good example on how the FP works.

I hope this helps.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 3 of 5
(4,307 Views)
Why add 2 after "GetSystemMetrics(SM_CYMENU) " please?
0 Kudos
Message 4 of 5
(3,717 Views)

It's room for the boundary line of the menubar.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 5
(3,703 Views)