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
    14

    CListCtrl and "Full Row Select" ...

    ... i was looking through some of the examples out here and i noticed one that talked about:
    LVS_EX_FULLROWSELECT

    to do full row select in my listctrls i've been using an example that i think i found in the microsoft knowledge base a long time ago. it seems to do the trick, but i thought that if they now support it as an option i would rather do it that way.

    so i tried to try this out, but my create fails.

    here is the create statement i'm using.


    m_listctrlParams = new CobolJclgenListctrl_params;
    m_listctrlParams->CreateEx(
    WS_EX_CLIENTEDGE // Ex Style
    ,WC_LISTVIEW // Class Name
    ,NULL // Window Name
    ,WS_CHILD // style
    | WS_BORDER
    | WS_VISIBLE
    | LVS_REPORT // implies a sortable header
    | LVS_ALIGNLEFT
    | LVS_EDITLABELS
    | LVS_OWNERDRAWFIXED
    | LVS_EDITLABELS // to support "edit cells"
    | LVS_EX_FULLROWSELECT
    ,rect.left // left
    ,rect.top // top
    ,rect.right // width
    ,rect.bottom // height
    ,this->GetSafeHwnd() // parent window
    ,NULL // ptr to param
    );




    is this the way it should be used?

    maybe my problem is that i'm still on VC 5.0 and this is a 6.0 feature?

    thanks for any info you can provide.

    craigk
    [email protected]



  2. #2
    Join Date
    May 1999
    Posts
    116

    Re: CListCtrl and "Full Row Select" ...

    It is an extended style so you must use CListCtrl::SetExtendedStyle to set it.


  3. #3
    Join Date
    May 1999
    Posts
    14

    Re: CListCtrl and "Full Row Select" ...

    as it turns out you actually need to use:

    ListView_SetExtendedListViewStyle(
    m_plistctrl->m_hWnd
    ,LVS_EX_FULLROWSELECT
    );




    thanks for getting me on the right track though.

    craigk
    [email protected]



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