In old compiler (CVI 😎 I used a few function to grab a panel with measurement status and publish it as BMP image to datasocket. On a remote computer, I link to the datasocket server, and display updates of the panel image. As existing exe-files for test, this runs on my new computer with Windows 7 x64.
With CVI2010, datasocket is not supported anymore. So I am switching the exchange to network variable. The conversion is not yet finished but I can send a demo panel to network variable and retrieve it in a second program. However, when I display the image then it is partly white/false. And when I move the panel, it seems as if I lose the panel/control ID.
The demo writer has its main (not existing in any real application) and a panel with dummy log-status.
The finalized reader should have to panels. One panel is for control; it is made as UIR. The second panel is made in the reader software. It is a panel without parent (parent panel handle = 0). In the panel, there is a picture control (CTRL_PICTURE) as large as the panel without borders. And there is a hidden, dimmed control that is used as link for a quit-callback.
I have inserted the code for making the panel for displaying the published copy. This code is identical for the old version (data socket version developed on Windows XP with CVI 😎 and the new version (network variable developed on Windows 7 x64 with CVI2010). I have attached a screen dump from both applications. Obvious the datasocket shows a correct copy, and the new version has an error.
For debugging in the new version, I have saved the bitmapid (just before transferring it to the picture control with SetCtrlBitmap) after receiving from the network variable to a file with SaveBitmapToBMPFile (bitmapid, "D:\\Pobox\\Test001.bmp"). This stored picture is ok.
Does anybody have seen similar deviating behaviour with software-generated panels/controls on WIndows 7 or CVI 2010 ?
Regards, Jos
// generating the panel with dummy values for size
if (bmpp < 0)
{
bmpp = NewPanel (0, "BMP Frame", 10, 10, 100, 100);
if (bmpp < 0) return -1; /* no new panel could be made */
SetPanelAttribute (bmpp, ATTR_CAN_MAXIMIZE, 0);
SetPanelAttribute (bmpp, ATTR_SIZABLE, 0);
SetPanelAttribute (bmpp, ATTR_CLOSE_ITEM_VISIBLE, 1);
SetPanelAttribute (bmpp, ATTR_MOVABLE, 1);
bmpc = NewCtrl (bmpp, CTRL_PICTURE, "", 0, 0);
if (bmpc < 0) /* no control in new panel could be made */
{
DiscardPanel(bmpp);
return -1;
}
quitc = NewCtrl (bmpp, CTRL_SQUARE_COMMAND_BUTTON_LS, "Quit", 0, 0);
if (quitc < 0) /* no control in new panel could be made */
{
DiscardPanel(bmpp);
return -1;
}
SetCtrlAttribute (bmpp, quitc, ATTR_ZPLANE_POSITION, 999);
SetCtrlAttribute (bmpp, quitc, ATTR_VISIBLE, 0);
SetCtrlAttribute (bmpp, quitc, ATTR_DIMMED, 1);
InstallCtrlCallback (bmpp, quitc, NvReadQuitButton, 0);
SetPanelAttribute (bmpp, ATTR_CLOSE_CTRL, quitc);
SetCtrlAttribute (bmpp, bmpc, ATTR_FRAME_VISIBLE, 0);
SetCtrlAttribute (bmpp, bmpc, ATTR_LABEL_VISIBLE, 0);
Status = DisplayPanel(bmpp);
}