Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 2.19 KB

GetObject.md

File metadata and controls

68 lines (49 loc) · 2.19 KB

Home

Function name : GetObject

Group: Device Context - Library: gdi32


The GetObject function retrieves information for the specified graphics object.


Code examples:

Storing content of the Clipboard to a bitmap file
Using the LoadImage function to have a bitmap file loaded and displayed on VFP main window
How to print a bitmap file
Drawing Windows predefined bitmaps using the LoadBitmap functions
Displaying bitmap using the AlphaBlend function
Splash Screen for the VFP application
Bitmap Class for Visual FoxPro application
Displaying animated images on FoxPro form with BitBlt and StretchBlt functions
How to convert a bitmap file to monochrome format (1 bpp)
Converting image file to .ICO file

Declaration:

int GetObject(
  HGDIOBJ hgdiobj,  // handle to graphics object
  int cbBuffer,     // size of buffer for object info
  LPVOID lpvObject  // buffer for object info
);  

FoxPro declaration:

DECLARE INTEGER GetObject IN gdi32;
AS GetObjectA;
	INTEGER   hgdiobj,;
	INTEGER   cbBuffer,;
	STRING  @ lpvObject
  

Parameters:

hgdiobj [in] Handle to the graphics object of interest.

cbBuffer [in] Specifies the number of bytes of information to be written to the buffer.

lpvObject [out] Pointer to a buffer that receives the information about the specified graphics object.


Return value:

If the function succeeds, and lpvObject is a valid pointer, the return value is the number of bytes stored into the buffer.


Comments:

Notice that GetObject is a name of a native VFP function with different purpose and interface. So the name GetObject ia already reserved. That is why this external function is declared with an alias.