Switching Views


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
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 );


  • Why I got system failure when insert an CListCtrl Item

    Posted by Legacy on 08/29/2002 12:00am

    Originally posted by: jerry

    void CMyListView::OnInitialUpdate()

    // TODO: Add your specialized code here and/or call the base class
    CListCtrl &lc = GetListCtrl();



  • If you can't do any thing then you have such comments Please remove "rubbish".

    Posted by Legacy on 06/14/2002 12:00am

    Originally posted by: owaid

    the codeguru is not for showing fire its only to solve other problems by telling them trick please try to support what ever you read but not tell any thing if you feel its any easy to do we know lots of people have lot much experience and such kind of thing are very easy for them. thanks Anjum.

  • Remove Such Comments

    Posted by Legacy on 08/09/2001 12:00am

    Originally posted by: Franklin

    Please Remove such Comments, Article contribution to the site is all on the Guys who like to share Knowledge, and CodeGuru is a Real Tool Giving Solutions to many a Practical Problems. If you feel that a Particular article is not useful to you Ignore It, Don't Give Out Stupid Comments, No one Ever Awaits your Stupid Irrelavant Comments, I think a little bit of clue solves many a problems. And this Article really did solve a long pending problem for me,Thanks to Anjum.

  • Rubbish

    Posted by Legacy on 07/27/1999 12:00am

    Originally posted by: hui


Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Milliseconds matter. Make your systems faster with an uncompromising approach to designing and deploying your cloud foundation on IBM Cloud.

  • Cloud has the potential to offer many benefits that can enable great success within your business. However, there are still many myths floating around about backing up to the cloud. In this eBook, you'll discover the truth about five of the most common cloud myths, including myths about security, maintaining regulatory compliance and more. Get to the truth, so you can backup to the cloud with confidence.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date