I solved a similar problem by acquiring the current screen position
attributes when the program exits and saving them in hidden
numeric controls in a panel state file. Then when the program
is launched the next time, the previous panel position can be
restored programmatically from the numeric control values.
For example, add this to the end of your main() function:
// Get current screen position attributes of panels and save them as
// numeric controls so they can be recalled from the panel state the
// next time the program is launched.
GetPanelAttribute(panelGP, ATTR_TOP, &nGPTop);
GetPanelAttribute(panelGP, ATTR_LEFT, &nGPLeft);
SetCtrlVal(panelGP, GP_TOP, nGPTop);
SetCtrlVal(panelGP, GP_LEFT, nGPLeft);
// Save the current control settings to the panel state file
S
avePanelState(panelGP, szPanelStateFileName, 0);
And add this to the start of your main() function:
// Restore panel to its previous position.
RecallPanelState(panelGP, szPanelStateFileName, 0);
SetPanelAttribute(panelGP, ATTR_TOP, nGPTop);
SetPanelAttribute(panelGP, ATTR_LEFT, nGPLeft);
It would be a real convenience if CVI had an option to
automatically save and restore panel positions in the panel
state file but at least it has hooks for you to do it yourself.
"Murray" wrote in message
news:5065000000080000005F2A0000-999158726000@exchange.ni.com...
> Once a screen/panel is opened up it does not include all of the text
> or buttons. Manually you can often stretch the panel (eg. function
> panels) but once the panel is closed then the size is not remembered.
> Even on pop-up of errors, the selction of buttons is not always
> visible and you do not get the choice of choosing any other than hot
> key. I am using a Matrox G400 video card (dual head).