ITfLangBarItemBitmapButton::DrawBitmap method (ctfutb.h)

Obtains the bitmap and mask for the bitmap button item.

Syntax

HRESULT DrawBitmap(
  [in]  LONG    bmWidth,
  [in]  LONG    bmHeight,
  [in]  DWORD   dwFlags,
  [out] HBITMAP *phbmp,
  [out] HBITMAP *phbmpMask
);

Parameters

[in] bmWidth

Contains the width, in pixels, of the bitmap button item.

[in] bmHeight

Contains the height, in pixels, of the bitmap button item.

[in] dwFlags

Not currently used.

[out] phbmp

Pointer to an HBITMAP value that receives the handle of the bitmap drawn for the bitmap item.

[out] phbmpMask

Pointer to an HBITMAP value that receives the handle of the mask bitmap. This is a monochrome bitmap that functions as a mask for phbmp. Each black pixel in this bitmap will cause the corresponding pixel in phbmp to be displayed in its normal color. Each white pixel in this bitmap will cause the cooresponding pixel in phbmp to be displayed in the inverse of its normal color.

To display the bitmap without color conversion, create a monochrome bitmap the same size as phbmp and set each pixel to black (RGB(0, 0, 0)).

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
E_INVALIDARG
One or more parameters are invalid.
E_OUTOFMEMORY
A memory allocation failure occurred.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ctfutb.h
DLL Msctf.dll
Redistributable TSF 1.0 on Windows 2000 Professional