LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I omit the horizontal lines in child panel titel bars?

I try to set colors and fonts of existing CVI parent and child panels
to system colors. SetPanelAttribute(hPanMeas, ATTR_CONFORM_TO_SYSTEM,
1) does not work.
Using a Windows SDK function
dwWindowTitleColor = GetSysColor(COLOR_CAPTIONTEXT);
i_red = (dwWindowTitleColor & 0x0000FF) >> 0;
i_green = (dwWindowTitleColor & 0x00FF00) >> 8;
i_blue = (dwWindowTitleColor & 0xFF0000) >> 16;
dwWindowTitleColor = MakeColor (i_red, i_green, i_blue );
SetPanelAttribute(hPanMeas, ATTR_TITLE_COLOR, dwWindowTitleColor);
works, but has to be done for each panel.

After setting the title bar color, horizontal black lines in the title
bar area outside the panel text are still drawn.
How can I omit these lines to that the title bar color matches the
system title bar color and does not appear darker as it is now?

Thank you in advance.

Andre Lehmann

0 Kudos
Message 1 of 3
(3,135 Views)
A simple method is: Append 200 or 300 spaces to the panel title. This will left adjust the panel title and suppress most of the black lines..
Another advice: Trying to simulate Win32 visual with CVI is a lot of work. Much more recommendable is using ComponentWorks ActiveX controls in a MFC application.
0 Kudos
Message 2 of 3
(3,127 Views)
Andre,

Which version of CVI are you using? Starting with CVI 7.0 (I believe) there is a panel attribute that you can use to change the titlebar appearance of child panels (parent panels should already be using the system setting). Try the following:

SetPanelAttribute (hPanMeas, ATTR_TITLEBAR_STYLE, VAL_WINDOWS_STYLE);

Luis
0 Kudos
Message 3 of 3
(3,120 Views)