次の方法で共有


CListCtrl::GetNumberOfWorkAreas

リスト ビュー コントロールの現在の作業領域数を取得します。

UINT GetNumberOfWorkAreas( ) const;

戻り値

現時点では使用されません。

解説

このメンバー関数は、Windows SDK に記述されている Win32 のマクロ ListView_GetNumberOfWorkAreas の動作を実装します。

使用例

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

必要条件

**ヘッダー:**afxcmn.h

参照

参照

CListCtrl クラス

階層図

CListCtrl::GetWorkAreas

その他の技術情報

CListCtrl のメンバー