DrawMetaFileIntoBitmap

#include "BIDIB.H"

 

HBITMAP CALLBACK DrawMetaFileIntoBitmap(                  HANDLE            hMF,
int              nWidth,
int              nHeight,
BOOL       bEnhanced)

Description

Draw the metafile into the bitmap from memory location.

Parameters

HANDLE

hMF;

Handle to the metafile.

int

nWidth;

Destination picture width.

int

nHeight;

Destination picture height.

BOOL

bEnhanced

If it is true, then the first parameter of hMF handle is a handle for Enhanced Metaf File. If it is false, then the handle is a handle for a WMF.

Return values

Return a handle to the device dependent bitmap if successful or NULL if fails.

Programming notes

None.

Requirements

Header :    Declared in BiDIB.h; include BiDIB.h.

Library :    Use BiDIB.lib.

DLLs :       BiDIB.dll.


Code example

#include "BIDIB.H"

 

switch(nFormatID) {

            ...

            case  METAFILE_FORMAT:

 

                        // realize metafile in bitmap

                        hDC = GetDC(hWnd);

                        hCurrentBitmap = DrawMetaFileIntoBitmap(hWnd, hDC,

                                                                                                (LPMETAFILEPICT) &MetaPict);

                        ReleaseDC(hWnd, hDC);

                        ...

                        break;

            ...