Export (0) Print
Expand All
MFC
Expand Minimize

CListCtrl::GetNumberOfWorkAreas 

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


UINT GetNumberOfWorkAreas( ) const;

Not used at this time.

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

// 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);

Community Additions

ADD
Show:
© 2014 Microsoft