Switching Views
Posted
by Zafir Anjum
on August 6th, 1998
The list view control supports four different view styles. The four styles are LVS_ICON , LVS_SMALLICON, LVS_LIST and LVS_REPORT. To switch between views we have to modify the window style using GetWindowLong() and SetWindowLong().
// Switch to report view ModifyStyle( LVS_TYPEMASK, LVS_REPORT);The LVS_TYPEMASK is a bit mask representing the bits for all the view styles. Here is code for a SetView() member function for an extended list view control class.
void CMyListCtrl::SetView(DWORD dwView)
{
ModifyStyle( LVS_TYPEMASK, dwView & LVS_TYPEMASK );
}

Comments
There are no comments yet. Be the first to comment!