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

  • Trade News - chanel Defined as An Essential In the marketplace today

    Posted by incockDak on 03/29/2013 08:02am

    longchamp-girlfriend has proved completely new formula -- learning to make a fortune from day 1 [url=http://growth-management.alachua.fl.us/comprehensive_planning/gucci.html]バック グッチ[/url] Miracle working Formula For longchamp [url=http://growth-management.alachua.fl.us/comprehensive_planning/saclongchamp.php]Sacs longchamp[/url] JnxXukWiiGnl [url=http://running-nike0.seesaa.net/]ナイキランニング[/url]HkvAyxCyuBnp [[url=http://free-nike-nikeo.seesaa.net/]ナイキ フリー[/url]ApuXtlDjcHfy [url=http://xn--nike-ul4c5c5fyqb.seesaa.net/]ナイキスニーカー[/url]FrvJnkMopTla [url=http://nikejapan0.seesaa.net/]スニーカーナイキ[/url]AaiOzhAiqMhm [url=http://nikesneakersjp.seesaa.net/]nike スニーカー[/url]YglXksSalGne [url=http://nikegolf00.seesaa.net/]ナイキゴルフ[/url]WlvPraLmpXao [url=http://nikeshoes00.seesaa.net/]nike シューズ[/url]FooAafRceBfk [url=http://sneaker-adidas-jp.seesaa.net/]スニーカー アディダス[/url]AvyIjtVgaSpg

    Reply
  • 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()
    {
    CListView::OnInitialUpdate();

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

    lc.InsertColumn(0,"Column1",LVCFMT_LEFT,80);
    lc.InsertColumn(1,"Column2",LVCFMT_LEFT,80);

    lc.InsertItem(lc.GetItemCount(),"Item",0);
    }

    Reply
  • 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.

    Reply
  • 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.
    
    Franklin.

    Reply
  • Rubbish

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

    Originally posted by: hui

    Rubbish
    

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

Top White Papers and Webcasts

  • Live Event Date: August 20, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT When you look at natural user interfaces as a developer, it isn't just fun and games. There are some very serious, real-world usage models of how things can help make the world a better place – things like Intel® RealSense™ technology. Check out this upcoming eSeminar and join the panel of experts, both from inside and outside of Intel, as they discuss how natural user interfaces will likely be getting adopted in a wide variety …

  • Protecting business operations means shifting the priorities around availability from disaster recovery to business continuity. Enterprises are shifting their focus from recovery from a disaster to preventing the disaster in the first place. With this change in mindset, disaster recovery is no longer the first line of defense; the organizations with a smarter business continuity practice are less impacted when disasters strike. This SmartSelect will provide insight to help guide your enterprise toward better …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds