Поделиться через


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

См. также

Основные понятия

CListCtrl Class

CListCtrl Members

Hierarchy Chart

CListCtrl::GetWorkAreas