Using Win32 functions in Visual FoxPro Image Gallery
GDI+ Bitmap
Code examples:
Custom GDI+ class
..msdn    Add comment     W32 Constants      Translate this page
Creates a Bitmap object based on a handle to a Windows Microsoft® Windows® Graphics Device Interface (GDI) bitmap and a handle to a GDI palette.
Code examples:
Custom GDI+ class
GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(
    HBITMAP hbm,
    HPALETTE hpal,
    GpBitmap** bitmap
FoxPro declaration:
DECLARE INTEGER GdipCreateBitmapFromHBITMAP IN gdiplus;
    INTEGER   hbm,;
    INTEGER   hpal,;
    INTEGER @ hbitmap
[in] Handle to a GDI bitmap.

[in] Handle to a GDI palette used to define the bitmap colors if hbm is not a device-independent bitmap (DIB).

[out] Handle to the GDI+ bitmap object.
Return value:
Returns 0 on success.
My comment:
You are responsible for deleting the GDI bitmap and the GDI palette. However, you should not delete the GDI bitmap or the GDI palette until after the GDI+ Bitmap object is deleted or goes out of scope.

Do not pass to the GDI+ Bitmap constructor a GDI bitmap or a GDI palette that is currently (or was previously) selected into a device context.
Word Index links for the GdipCreateBitmapFromHBITMAP :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2004-07-15 11:27:26
Modified: 2004-07-15 11:32:07
Visited in last 7 days: 27
User Contributed Notes:
There are no notes on this subject.

Copyright © 2001-2018 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
19 sec.Function: 'AVIFileGetStream'
Function group: 'Windows Multimedia'
38 sec.Function: 'mmioFlush'
Function group: 'Windows Multimedia'
57 sec.Function: 'SetFilePointer'
Function group: 'File Management'
1.3 min.Function: 'FindNextPrinterChangeNotification'
Function group: 'Printing and Print Spooler'
1.67 min.Function: 'CeRegCloseKey'
Function group: 'Remote Application Programming (RAPI)'
2.02 min.Function: 'GdipTranslateWorldTransform'
Function group: 'GDI+ Graphics'
2.33 min.Function: 'NetConnectionEnum'
Function group: 'Network Management'
2.7 min.Solutions
3 min.Example: 'How to find which fonts Windows uses for drawing captions, menus and message boxes'
3.35 min.Function: 'inet_addr'
Advertise here!