LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

InstallPopup AND DisplayPanel

Hallo everybody, I'm using LabWindows/CVI 6.0

I trie to display in my main function the normal PANEL and a STARTPOPUP-panel as a popup, but it do not work.
It shows me the PANEL and load the popup I think, because I cannot use the PANEL, it is dimmed. But the POPUP-PANEL is not displayed.
What's wrong?

int main (int argc, char *argv[])
{
if (InitCVIRTE (0, argv, 0) == 0)
return -1;
if ((panelHandle = LoadPanel(0, "test.uir", PANEL))<0)
return -1;
Display(panelHandle);

popup = LoadPanel(0, "test.uir", STARTPOPUP);
InstallPopup(popup);

RunUserInterface();

DiscardPanel(panelHandle);
return 0;
}




Should I have to it this way?
This way it works, but than the PANEL is started as Popup. Are there some difficulties in using than?

int main (...)
{
...
panel = LoadPanel(0, "test.uir", STARTPOPUP);
InstallPopup(panel);
RunUserInterface();

return 0;
}

int CVICALLBACK OK_BUTTON_ON_POPUPPANEL (...)
{
DiscardPanel(panel);
panelHandle = LoadPanel(0, "test.uir", PANEL);
InstallPopup(panelHandle);
return 0;
}

Thanks for helping.
Florian
0 Kudos
Message 1 of 5
(3,535 Views)
Hi Florian,

i'm not sure why u are seeing this problem, i have tried it on quite a few systems and it seems ok.
I have attached the file that i tried. you can try to see if it works.

Cheers
AL
0 Kudos
Message 2 of 5
(3,506 Views)
I see your programm works.
But my programm is written in the same way and it doesn't work. The only what is different I found is that I use also the tab function "EasyTab_ConvertFromCanvas".
It shows me again the PANEL with all the Tab-Panels, but dimmed. And the POPUPPANEL don't appear...

But I wrote this function into your program and it worked. *mmmhhhh* "????"

and now? I don't know....
0 Kudos
Message 3 of 5
(3,499 Views)
Is there a maximum of Panels in one uir-file?

I tried to excluded the popup-panel in another uir-file.
after the normal DisplayPanel(panelHandle) I wrote:

popupHandle = LoadPanel (0, "popup.uir", STARTPOPUP);
InstallPopup(popupHandle);

Than I have a build error: "undeclared identifier 'STARTPOPUP'"

Is it a problem to have two uir-files???
0 Kudos
Message 4 of 5
(3,498 Views)
Hi Florian,

i'm not sure of the max number of panels in one *uir but i doubt if that is the problem at all.


Every new *.uir file will create a *.h when you save the *.uir. (Example: Test.uir => test.h)

Just remember to include the header file into the *.c if the requires controls from that particular *.uir.


In your case, just insert the bottom statement under the #include "test.h". That should solve the error.
#include "popup.h"

You can have any number of *uir files in your project (not too sure if there is a max number though).

Hope this helps. 🙂

Cheers
AL

Message Edited by AL on 06-03-2005 06:17 PM

0 Kudos
Message 5 of 5
(3,495 Views)