Export (0) Print
Expand All
Expand Minimize

CListCtrl::GetNumberOfWorkAreas

Retrieves the current number of working areas for a list view control.

UINT GetNumberOfWorkAreas( ) const;

Return Value

Not used at this time.

Remarks

This member function implements the behavior of the Win32 macro, ListView_GetNumberOfWorkAreas, as described in the Platform SDK.

Example

// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;

UINT i, uCount = pmyListCtrl->GetNumberOfWorkAreas();
LPRECT lpRects = (LPRECT) malloc(uCount*sizeof(RECT));
ASSERT(lpRects != NULL);

// Dump all of the work area dimensions.
pmyListCtrl->GetWorkAreas(uCount, lpRects);

for (i=0;i < uCount;i++)
{
   TRACE (TEXT("Work area %d; left = %d, top = %d, right = %d, 
      bottom = %d\r\n"),
      i, lpRects[i].left, lpRects[i].top, lpRects[i].right, 
      lpRects[i].bottom);
}

free(lpRects);

See Also

CListCtrl Overview | Class Members | Hierarchy Chart | CListCtrl::GetWorkAreas

Show:
© 2014 Microsoft