Help Center

CTrackbar.SetBuddymethod

Assigns a window as the buddy window for a trackbar control.

WindowsmethodCTrackbar.incdocumented

Syntax

FUNCTION SetBuddy (BYVAL hTrackbar AS HWND, BYVAL fLocation AS BOOLEAN, BYVAL hwndBuddy AS HWND) AS HWND

Parameters

NameDescription
hTrackbarHandle to the trackbar control.
fLocationValue specifying the location at which to display the buddy window. This value can be one of the following:
TRUE: The buddy will appear 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 will appear 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.
hTrackbarHandle to the window that will 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.

Description

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).

Reference

  • Include file CTrackbar.inc
  • Defined in AfxNova/CTrackbar.inc:289
  • Documented in Windows/WIndows Controls/CTrackbar Class.md
  • Topic: CTrackbar Class