+ Reply to Thread
Results 1 to 2 of 2

Thread: how to select full rows in an MFC List Control

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    2

    how to select full rows in an MFC List Control

    I have an MFC application, dialog based with CListCtrl
    i managed to add the columns and the items in "report" view and all work well
    only on runtime i can't select the full row, only the first item!
    i can't see any option in the properties window for that

  2. #2
    Junior Member
    Join Date
    Jun 2012
    Posts
    2
    Visual Studio is a great toy for starting up, but you can't find everything in the properties window
    here is what you have to add to make the report view control list row selectable
    assuming the variable name of your control list is m_MyCtrlList
    add this extended style: m_MyCtrlList.SetExtendedStyle(LVS_EX_FULLROWSELECT );
    since your app is dialog based, the best place for this code is inside OnInitDialog() at the time where all controls are created

+ Reply to Thread

Bookmarks

Posting Permissions

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