Windows apps
Collapse the table of content
Expand the table of content
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.

IWICImagingFactory::CreateBitmapFromHBITMAP method

Creates an IWICBitmap from a bitmap handle.

Syntax


HRESULT CreateBitmapFromHBITMAP(
  [in]         HBITMAP                     hBitmap,
  [in, unique] HPALETTE                    hPalette,
  [in]         WICBitmapAlphaChannelOption options,
  [out]        IWICBitmap                  **ppIBitmap
);

Parameters

hBitmap [in]

Type: HBITMAP

A bitmap handle to create the bitmap from.

hPalette [in]

Type: HPALETTE

A palette handle used to create the bitmap.

options [in]

Type: WICBitmapAlphaChannelOption

The alpha channel options to create the bitmap.

ppIBitmap [out]

Type: IWICBitmap**

A pointer that receives a pointer to the new bitmap.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

For a non-palletized bitmap, set NULL for the hPalette parameter.

Requirements

Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Wincodec.h

IDL

Wincodec.idl

Library

Windowscodecs.lib

DLL

Windowscodecs.dll

See also

IWICImagingFactory
WICBitmapAlphaChannelOption
GDI+ Bitmap class
GDI+ Bitmap.GetHBITMAP method

 

 

Show:
© 2017 Microsoft