次の方法で共有


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