none
CListCtrl drag and drop

    Question

  • Have a CListCtrl (Visual C++) and added this style SetExtendedStyle(LVS_EX_HEADERDRAGDROP)

    The headers move but none of the data moves.

    How do I get the column headers and data to move together like you can in an excel sheet

    Tuesday, November 15, 2011 11:00 PM

All replies

  • Hi,

     

    Based on my knowledge, the LVS_EX_HEADERDRAGDROP is only available to list view controls that use the LVS_REPORT style. So  please make sure that you have set the  LVS_REPORT style when you created the ListCtrol.

     

    Best Regards,

    Rob


    Rob Pan [MSFT]
    MSDN Community Support | Feedback to us
    Thursday, November 17, 2011 7:12 AM
  • Hi,

     

    Please try to use the these code:

     // Allow the header controls item to be movable by the user.

    m_myListCtrl.SetExtendedStyle (m_myListCtrl.GetExtendedStyle()|LVS_EX_HEADERDRAGDROP);

     

     

    Best Regards,

    Rob


    Rob Pan [MSFT]
    MSDN Community Support | Feedback to us
    Tuesday, November 22, 2011 7:34 AM
  • Check this out:

    http://www.codeproject.com/KB/list/CListCtrlEx.aspx?display=Print

    -Seetharam

    • Marked as answer by Rob Pan Friday, December 09, 2011 8:47 AM
    • Unmarked as answer by Workinhard Wednesday, December 14, 2011 9:43 PM
    Wednesday, November 23, 2011 5:12 PM