Programmatic Bitmap Save in CVI 5.0 and 5.5-7.1
Downloads
Filename: bitmap_55_to_71.zip
Requirements: View
Filename: bitmap50.zip
Requirements: View
Both programs save a control or a panel from the .UIR to a bitmap file.
The CVI 5.0 program gets a bitmap of the object, copies it to the clipboard, and then saves the bitmap to a file using GetCtrlDisplayBitmap and SetBitmapToFile defined in the File.OBJ. This program uses SDK functions already compiled in an OBJ file that must be included with the project. Make sure to use the OBJ file that corresponds to CVI's compatibility mode (in the Project window under Options>>Compilier Options).
LabWindows/CVI 5.5-7.1: This program uses functions from the Programmer's Toolbox available in LabWindows/CVI 5.5 and higher. These functions are SavePanelDisplayToFile and SaveCtrlDisplayToFile. As you can see in the file demo.c, you have the choice of using these functions or using SavePanelDisplayBitmap and SaveCtrlDisplayBitmap then using SaveBitmapToFile to save the bitmap to disk instead. (you would need to comment out the functions SavePanelDisplayToFile and SaveCtrlDisplayToFile)
The format of *.fp has changed from CVI 5.0 to CVI 5.5, attempting to use the fp in CVI 5.0 will not work. Also using the OBJ file from the CVI 5.0 example will not work in CVI 5.5.
Requirements
Filename: bitmap_55_to_71.zip
Software Requirements
Application Software: LabWindows/CVI Full Development System 5.5, LabWindows/CVI Full Development System 7.1, LabWindows/CVI Full Development System 5.5.1, LabWindows/CVI Full Development System 7.0, LabWindows/CVI Full Development System 6.0
Language(s): C
Software Requirements
Application Software: LabWindows/CVI Full Development System 5.0.1
Language(s): C
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
