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 Windows SDK.
UINT i, uCount = m_myListCtrl.GetNumberOfWorkAreas();
LPRECT lpRects = (LPRECT) malloc(uCount*sizeof(RECT));
if (lpRects != NULL)
{
// Dump all of the work area dimensions.
m_myListCtrl.GetWorkAreas(uCount, lpRects);
for (i=0; i < uCount; i++)
{
TRACE(_T("Work area %d; left = %d, top = %d, right = %d, ")
_T("bottom = %d\r\n"),
i, lpRects[i].left, lpRects[i].top, lpRects[i].right,
lpRects[i].bottom);
}
free(lpRects);
}
else
{
TRACE(_T("Couldn't allocate enough memory!"));
}
Header: afxcmn.h