Expand Minimize

LVM_APPROXIMATEVIEWRECT message

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

Parameters

wParam

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

lParam

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

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

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.

Remarks

Setting the size of the list-view control based on the dimensions provided by this message can optimize redraw and reduce flicker.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Commctrl.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft