Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This message assigns a window as the buddy window for a trackbar control. Trackbar buddy windows are automatically displayed in a location relative to the control's orientation, horizontal or vertical.

Syntax

TBM_SETBUDDY 
wParam = (WPARAM)(BOOL) 
fLocation;

lParam = (LPARAM)(HWND) 
hwndBuddy;

Parameters

fLocation

Boolean that specifies the location at which to display the buddy window. It is one of the following values.

Value Description

TRUE

The buddy appears to the left of the trackbar if the trackbar control uses the TBS_HORZ style. If the trackbar uses the TBS_VERT style, the buddy appears above the trackbar control.

FALSE

The buddy appears to the right of the trackbar if the trackbar control uses the TBS_HORZ style. If the trackbar uses the TBS_VERT style, the buddy appears below the trackbar control.

hwndBuddy

Handle to the window to be set as the trackbar control's buddy.

Return Value

Returns the handle to the window that was previously assigned to the control at that location.

Remarks

Trackbar controls support up to two buddy windows. This can be useful when you must display text or images at each end of the control.

Requirements

Header commctrl.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later