LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DisplayPanel use

Using LabWindows/CVI 8.1.0 on Windows XP.

When should DisplayPanel (handle) be called? I have a long routine that configures the controls in a window. If I put DisplayPanel() in the front of the routine, just after the LoadPanelEx() call, followed by the various calls to SetCtrlAttribute, then it seems to work. It's rather annoying since the window shows in its raw form for a few seconds. If I put it at the end of the routine, it crashes and gives me a General Protection Fault. 

 

Any suggestions would be welcome. 

0 Kudos
Message 1 of 5
(3,843 Views)

then you are having a problem with your call to DisplayPanel(). you should be able to call DisplayPanel()or HidePanel() whenever you want, as long as your panel handle is valid.

 

make sure that you are using the right panel handle. also run your software with the debugger to see where the program is crashing when you put the DisplayPanel() at the end: it may be a bad condition inside a callback function.

Message 2 of 5
(3,840 Views)
It's crashing inside the call to DisplayPanel(); I have the debugger set to "Extended" and it doesn't give me further information. There must be a pointer wrong somewhere.
0 Kudos
Message 3 of 5
(3,808 Views)

Can you post a section of code that exhibits the problem? Apart from a corrupted panelHandle I don't see why your approach should not work - as dummy_decoy says you should be able to display and hide the panel as often as you like. There were some early reports of DisplayPanel() crashing when Lab style controls were being used, but that was ages ago with CVI7, IIRC.

 

JR

Message 4 of 5
(3,800 Views)

Did you use the debugger to check the panel handle value before calling DisplayPanel() as dummy_decoy suggested?

Set two breakpoints: one on the line after LoadPanelEx(), and one on the line that calls DisplayPanel().

At each breakpoint, point to the panel handle variable to see its value.  Do the two values match?

 

Make sure you don't have a variable scope problem: is the variable for panel handle accessible by both programs?  Is it a global or is it local?

 

The only way I've see DisplayPanel() fail is if you pass it a bad panel handle.

Message 5 of 5
(3,797 Views)