Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

PlusMinus

Defines the plus/minus bitmaps used for all items.

C

BOOL WINAPI SftTree_SetPlusMinus(HWND hwndCtl, HBITMAP *lphBitmap);
BOOL WINAPI SftTreeSplit_SetPlusMinus(HWND hwndCtl, HBITMAP *lphBitmap);

C++

BOOL CSftTree::SetPlusMinus(int val = 0);
BOOL CSftTree::SetPlusMinus(const CBitmap Bitmap[3]);
BOOL CSftTreeSplit::SetPlusMinus(int val = 0);
BOOL CSftTreeSplit::SetPlusMinus(const CBitmap Bitmap[3]);

Parameters

hwndCtl

The window handle of the tree control.

lphBitmap, Bitmap

A pointer to three bitmap handles or an array of three CBitmap objects for bitmaps of equal size. These three bitmaps are used as plus/minus bitmaps for 1) an expandable parent item, 2) an expanded parent item and 3) a leaf item. The top, left pixel of each bitmap must contain the image's background color. This color will be replaced by the actual window background color when the bitmap is displayed. This parameter may be NULL to stop displaying plus/minus bitmaps.

val

The only allowable value is 0, which is used to stop displaying plus/minus bitmaps.

Returns

The return value is TRUE if the function was successful, otherwise FALSE is returned.

Comments

The SetPlusMinus function defines the plus/minus bitmaps used for all items.

There are no predefined default plus/minus bitmaps.

All plus/minus bitmaps must be the same size. Plus/minus bitmaps will not be shown unless bitmaps have been registered using this function. The height of all tree items is adjusted automatically to allow the complete bitmap to be displayed. The bitmaps can be changed even after items have been added to the tree control. The new bitmaps will immediately be used. The application retains ownership of the bitmaps, and cannot delete the bitmaps until the tree control no longer uses the bitmaps (usually until the tree control is destroyed or the bitmaps are changed using SetPlusMinus).

GetShowPlusMinus can be used to determine if plus/minus bitmaps are shown.

See Also C/C++ API | Categories | Notifications