Condividi tramite


CListCtrl::GetNumberOfWorkAreas

Recupera il numero corrente delle aree di lavoro per un controllo visualizzazione elenco.

UINT GetNumberOfWorkAreas( ) const;

Valore restituito

Non utilizzato attualmente.

Note

Questa funzione membro implementa il comportamento Win32 della macro, ListView_GetNumberOfWorkAreas, come descritto in Windows SDK.

Esempio

        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!"));   
        }

Requisiti

Header: afxcmn.h

Vedere anche

Riferimenti

Classe di CListCtrl

Grafico della gerarchia

CListCtrl::GetWorkAreas