Windows Dev Center

Expand Minimize

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


DWORD ListView_ApproximateViewRect(
   hwndLV hwndLV,
   int    cx,
   int    cy,
   int    iCount
);

Parameters

hwndLV

Type: hwndLV

A handle to the list-view control.

cx

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.

cy

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

Returns a DWORD value that holds the approximate width (in the LOWORD) and height (in the HIWORD) needed to display the items, in pixels.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Commctrl.h

 

 

Community Additions

ADD
Show:
© 2015 Microsoft