Smart Device Functions:
Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than gdi32, prefix the name with the module name and a period.
Had a terrible time getting this to work to retrieve a BITMAP object from a HBITMAP, this code finally worked.
(EDIT: Before going through all this check out the tips & tricks section for an official API to do this)
IntPtr ptrToBitmap = hndl.AddrOfPinnedObject();
GDI32.GetObject(hBitmap, Marshal.SizeOf<GDI32.BITMAP>(), ptrToBitmap);
bmpScreen = Marshal.PtrToStructure<GDI32.BITMAP>(ptrToBitmap);
Tips & Tricks:
A better option than the above example would be to leverage Image.FromHbitmap
Image.FromHbitmap Documentation on MSDN: https://msdn.microsoft.com/en-us/library/k061we7x
Please add some!
Alternative Managed API:
Do you know one? Please contribute it!
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.
1/13/2008 11:00:13 AM - Damon Carr-18.104.22.168
TODO - a short description
7/28/2010 8:52:29 PM - anonymous
Please edit this page!
Do you have...