Mega Code Archive

 
Categories / Delphi / API
 

Using the winapi getobject to get a bitmap

Question: How to I gain access to the TBitmap types used by the Windows API function GetObject()? Answer: The WinTypes/Windows, and Graphics units have two different definitions of TBitmap. You can qualify the one you want by prefacing the unit name like this: var AWindowsTBitmap : Windows.TBitmap; AVclTBitmap : Graphics.TBitmap;