ListView_ApproximateViewRect macro

Calculates the approximate width and height required to display a given number of items. You can use this macro or send the LVM_APPROXIMATEVIEWRECT message explicitly.

Syntax

void ListView_ApproximateViewRect(
   hwnd,
   iWidth,
   iHeight,
   iCount
);

Parameters

hwnd

Type: hwndLV

A handle to the list-view control.

iWidth

Type: int

The proposed x-dimension of the control, in pixels. This parameter can be -1 to allow the message to use the current width value.

iHeight

Type: int

The proposed y-dimension of the control, in pixels. This parameter can be -1 to allow the message to use the current height value.

iCount

Type: int

The number of items to be displayed in the control. If this parameter is -1, the message uses the total number of items in the control.

Return value

None

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h