From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

InstallPopup window active but not visible

I'm creating a DLL containing callback functions for use in an external compiler. The DLL loads a parent panel, a child panel and grandchild panels using LoadPanelEx(). LoadPanelEx() returns valid panel handles, not errors, for all panels. The parent panel is successfully displayed using DisplayPanel().

I try to display the child panel passing the handle returned from LoadPanelEx() to InstallPopup(), which returns 0 (meaning success, no error), but no panel is displayed. The parent panel title bar is gray and its buttons aren't active. The child panel is active: if I press O (the child panel is closed with an __OK button) the parent panel is active again.

I had the child working previously, then I modified the UIR:
I added a panel, deleted a panel (using Edit>>Cut Panel), changed some callback function names, added new controls to the parent panel, regenerated prototypes, and rebuilt the project. I get no compile errors or runtime errors, but I get no child displayed.
0 Kudos
Message 1 of 4
(2,887 Views)
Modal windows (popups) should NOT normally be child windows. The parent-child windows relationship is a different relationship than a modal window over a main window. What is probably happening is the popup window is showing up outside the bounds of the parent so it is not visible. Load the panels normally without assigning parent-child relationships and it should work fine.


Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 4
(2,887 Views)
The problem was a basic mistake: when I was editing the UIR, I moved the child panel down and off the screen to make other panels easier to see while editing. In the code I didn't call SetPanelPos(), so the panel got opened and "displayed" off the screen. Now I call SetPanelPos() to place it where I want regardless of where it is in the UIR.
Sorry if anybody wasted time trying to figure this out.
0 Kudos
Message 3 of 4
(2,887 Views)
Thanks Chris.
My main problem was that I inadvertently moved the child panel off the screen while editing the UIR. With the child panel off the screen, it didn't matter if I loaded it normally or as a parent-child: I still didn't see it. After using SetPanelPos(), I could see it as a parent-child.
However, I'll take your advice on not making a modal window a child. Thanks, Al
0 Kudos
Message 4 of 4
(2,887 Views)