Converts the current image of an object derived from the GraphicObject baseclass to a standard Windows bitmap.
String GetAsBitmap ( graphicObject , bitmap )
Argument |
Description |
---|---|
graphicObject |
Read-only value for current object that inherits from GraphicObject |
bitmap |
Blob variable passed by reference for the bitmap created from a GraphicObject descendent |
Integer. Returns 1 for success and a negative number if an error occurs.
You assign the visual object that you want to capture in the first argument to the GetAsBitmap fucntion, and reference the bitmap you want to create as a Blob datatype in the second argument to the function. The bitmap can then be saved to a file or set in a picture control.
This example in a command button Clicked event saves the button image in a Picture control:
int li_ret
BLOB lb_bmp
li_ret = GetAsBitmap (this, lb_bmp)
p_result.SetPicture(lb_bmp)