Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Bitmap.Bitmap(HBITMAP, HPALETTE) constructor

Applies to: desktop apps only

Creates a Bitmap::Bitmap object based on a handle to a Windows Windows Graphics Device Interface (GDI) bitmap and a handle to a GDI palette.

Syntax

Bitmap(
  [in]  HBITMAP hbm,
  [in]  HPALETTE hpal
);

Parameters

hbm [in]

Type: HBITMAP

Handle to a GDI bitmap.

hpal [in]

Type: HPALETTE

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

Remarks

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::Bitmap object is deleted or goes out of scope.

Do not pass to the GDI+ Bitmap::Bitmap constructor a GDI bitmap or a GDI palette that is currently (or was previously) selected into a device context.

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusheaders.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Bitmap
Bitmap Constructors
Bitmap::FromHBITMAP
Image
Using Images, Bitmaps, and Metafiles
Images, Bitmaps, and Metafiles

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

Show:
© 2014 Microsoft