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

    Highlighting a row in a ClistCtrl in a DialogBox

    I would like to know how to highlight a row in a CListCtrl in a dialogbox. I basically created a dialog box, dropped a clistctrl in the dialog box and I am having trouble selecting the whole row. If anyone has any suggestions, I would appreciate them. Thanks, Angie.


  2. #2
    Guest

    Re: Highlighting a row in a ClistCtrl in a DialogBox

    Try adding the following code in your dialog's OnInitDialog function:

    WORD dwStyle = ListView_GetExtendedListViewStyle(m_ListCtrl->m_hWnd );
    dwStyle |= LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT;
    ListView_SetExtendedListViewStyle( m_ListCtrl->m_hWnd, dwStyle );

    m_ListCtrl is a user-defined member variable for your dialog's list control. This code turns on full row selection for your dialog.


  3. #3
    Join Date
    May 1999
    Posts
    21

    Re: Highlighting a row in a ClistCtrl in a DialogBox

    Thanks. That worked.


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