LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Color of popup

Hello,

the function MessagePopup from the User Interface Library has the background selected in the windows settings of the screen. How can I determine this color to use it for other purposes?

Michael
0 Kudos
Message 1 of 6
(3,660 Views)
Hello

If you need to customize the appearence of your popup panel, you can create your own panel and install it as a popup by using the InstallPopup() function. You can configure the font settings on the default popup box, but not its color. You can use the installpop like so:

panel1=LoadPanel(0,"1.uir",PANEL1);
InstallPopup(panel1);
GetUserEvent(1,&panelID,&controlID);
RemovePopup(1);

Hope this helps
Bilal Durrani
NI
0 Kudos
Message 2 of 6
(3,646 Views)
Instead, if you want to know which color is the system popup background, you can use

GetWindowsColor (SYS_BTNFACE, &color);


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 3 of 6
(3,644 Views)
I forgot to say that this function is in the Programmer's Toolbox that comes with CVI (cvidir\toolslib\toolbox\toolbox.fp)


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 4 of 6
(3,640 Views)
The popup panel is the windows color because it has the panel attribute ATTR_CONFORM_TO_SYSTEM set. You can make any panel that color by setting the same attribute. You can then get the color by getting the attribute ATTR_BACKCOLOR of the panel.

- jared
0 Kudos
Message 5 of 6
(3,638 Views)
Thank you Roberto, that is what I was searching.

Michael
0 Kudos
Message 6 of 6
(3,636 Views)