InvertBitmap

#include "BIDIB.H"

BOOL CALLBACK InvertBitmap(HBITMAP hbitSource)

Description

Inverts bitmap bit by bit.

Parameters

HBITMAP

hbitSource

Handle to the bitmap to be inverted.

Return values

TRUE on success otherwise FALSE.

Programming notes

This function uses three DCs at once, if it fails, check the number of currently used DCs. Memory is allocated to handle only one line of the bitmap, and it is freed upon exit.

Requirements

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

Library :    Use BiDIB.lib.

DLLs :       BiDIB.dll.

Code example

#include "BIDIB.H"

 

                HBITMAP hBitmap;

                .

                .

                if (!InvertBitmap(hBitmap))

                {

                  // error

                  // check number of currently used DCs

                }