CSliderCtrl::GetBuddy

Retrieves the handle to a slider control buddy window at a given location.

CWnd* GetBuddy(
   BOOL fLocation = TRUE 
) const;

Parameters

  • fLocation
    A Boolean value that indicates which of two buddy window handles to retrieve. Can be one of the following values:

    • TRUE   Retrieves the handle to the buddy to the left of the slider. If the slider control uses the TBS_VERT style, the message will retrieve the buddy above the slider.

    • FALSE   Retrieves the handle to the buddy to the right of the slider. If the slider control uses the TBS_VERT style, the message will retrieve the buddy below the slider.

Return Value

A pointer to a CWnd object that is the buddy window at the location specified by fLocation, or NULL if no buddy window exists at that location.

Remarks

This member function implements the behavior of the Win32 message TBM_GETBUDDY, as described in the Windows SDK. For a description of the slider control styles, see Trackbar Control Styles in the Windows SDK.

Requirements

Header: afxcmn.h

See Also

Reference

CSliderCtrl Class

Hierarchy Chart

CSliderCtrl::SetBuddy

Other Resources

CSliderCtrl Members