Help Center

CRebar.SizeToRectmethod

Attempts to find the best layout of the bands for the given rectangle.

WindowsmethodCRebar.incdocumented

Syntax

FUNCTION SizeToRect (BYVAL hRebar AS HWND, BYVAL prc AS RECT PTR) AS BOOLEAN
FUNCTION SizeToRect (BYVAL hRebar AS HWND, BYREF rc AS RECT) AS BOOLEAN
FUNCTION SizeToRect (BYVAL hRebar AS HWND) AS RECT

Parameters

NameDescription
hRebarZero-based index of a band in the rebar control.
prcPointer to a RECT structure that specifies the rectangle to which the rebar control should be sized.

Return value

Returns nonzero if a layout change occurred, or zero otherwise.

Description

Attempts to find the best layout of the bands for the given rectangle.

Remarks

The rebar bands will be arranged and wrapped as necessary to fit the rectangle. Bands that have the RBBS_VARIABLEHEIGHT style will be resized as evenly as possible to fit the rectangle. The height of a horizontal rebar or the width of a vertical rebar may change, depending on the new layout.

Reference

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