ListView_ApproximateViewRect

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This macro calculates the approximate width and height required to display a specified number of items.


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

hwndLV

Handle to a list-view control.

iCount

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.

cxand cy

Proposed dimensions of the control, in pixels. Either parameter can be –1 to allow the message to use the current width or height value.

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

Related message: LVM_APPROXIMATEVIEWRECT

Headercommctrl.h
Windows Embedded CEWindows CE 2.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show: