LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

"PrintCtrl" to a bitmap file, the *.bmp file could not be opened

Hello,
I used the
PrintPanel (panelHandle,"H:\\test.bmp" , 1, VAL_VISIBLE_AREA, 1);
in order to save picture of the panelHandle to a test.bmp tile, the file indeed could be generate,
however, the test.bmp file could not be opened.
Maybe some of the attribute should be set before the use of "PrintPanel", or if I want to realize this,
other methods should be used?
Thanks!  
0 Kudos
Message 1 of 3
(3,166 Views)

PrintPanel is not intended to create an image of the panel: the file produced is a printer file, i.e. a file that can be sent to a printer via a "copy" command.

To obtain a copy of a panel as an image file you must use GetPanelDisplayBitmap and pass the obtained bitmap to SaveBitmapToXXXFile (BMP or JPEG as you want) function; both of them are located in the User Interface library.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 3
(3,163 Views)
Hi Robert,
Thanks very much for your reply. Since the version I am using is CVI IDE 5.0, so no such  SaveBitmapToXXXFile function exist.
However, I tried the  instruments supplied by Guillaume Dargaud in his website as you suggest, it did work!
Thanks again!
Best ragards!
 
              LIXiaogai
0 Kudos
Message 3 of 3
(3,141 Views)