CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 1999
    Posts
    92

    Using the CListCtrl

    I would like to know how can I add columns to a clistview and have the column be drawn a particular size so that I can see the title that I gave the column.


  2. #2
    Join Date
    Apr 1999
    Posts
    27

    Re: Using the CListCtrl

    Hi
    Try it like that to insert the colums (CListCtrl needs to be in (REPORT style)
    CListCtrl* pLC;
    pLC = (CListCtrl*) GetDlgItem(IDC_YOURID);

    pLC->InsertColumn(0, "...");
    pLC->InsertColumn(1, "...");
    pLC->InsertColumn(2, "...");

    pLC->SetColumnWidth(0, 120);
    pLC->SetColumnWidth(1, 75);
    pLC->SetColumnWidth(2, 195);

    cu


    --
    -=SKULK=-

  3. #3
    Join Date
    May 1999
    Posts
    92

    Re: Using the CListCtrl

    Thanks for the help. It solved my problem. I have another question though. I am now trying to insert items and have been able to get some in my listview class, but they go straignt down, but need them to go down and across. How can I do that?


  4. #4
    Join Date
    Apr 1999
    Posts
    27

    Re: Using the CListCtrl

    Hi Delbert
    Use SetItem(Item, Subitem,....) to set the subitem.
    have a look at MSDN CListCtrl - class members for description.
    cu


    --
    -=SKULK=-

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured