我查msdn没查到,可例程中很多地方都用到了
BOOL CRowListView::SetViewType(DWORD dwViewType)
{
return(ModifyStyle(LVS_TYPEMASK,dwViewType & LVS_TYPEMASK));
}
这算是什么意思?

解决方案 »

  1.   

    You can use the LVS_TYPEMASK mask to isolate the window styles that correspond to the current view: LVS_ICON, LVS_LIST, LVS_REPORT, and LVS_SMALLICON. 该参数主要用在函数GetWindowLong()和SetWindowLong()中。
      

  2.   

    In an MFC application, you can handle this by adding a message map entry for the command (IDM_LARGEICON for large icon view), and you can change the view by setting the window style. To check the current view of the control, use the LVS_TYPEMASK constant. The current view can be LVS_ICON, LVS_SMALLICON, LVS_LIST, or LVS_REPORT. void CMfclistView::OnLargeicon () 
    {
    DWORD dwStyle;dwStyle = GetWindowLong (m_ListCtl.m_hWnd, GWL_STYLE);if ((dwStyle & LVS_TYPEMASK) != LVS_ICON)
    SetWindowLong (m_ListCtl.m_hWnd, GWL_STYLE,
    (dwStyle & ~LVS_TYPEMASK) | LVS_ICON);
    }