I Need to make the CListCtrl non sortable at run time
-
Hi Dear, I need to make the report view of the list control non sortable( Disable Sorting) at run time. But i could not find out any API. Can Any body help me:(
-
Hi Dear, I need to make the report view of the list control non sortable( Disable Sorting) at run time. But i could not find out any API. Can Any body help me:(
Hi! CListCtrl sounds like MFC (i.e. unmanaged), so I guess you've asked this question in the wrong forum. Try here: Visual C++ / MFC[^] But wait... try if this answers your question:
CListCtrl yourListCtrl;
...
CHeaderCtrl* pHeader = yourListCtrl.GetHeaderCtrl();
if(pHeader)
{
// (1) do this to enable header push buttons
pHeader->ModifyStyle(0, HDS_BUTTONS);// (2) do this to disable header push buttons
pHeader->ModifyStyle(HDS_BUTTONS, 0);
}cheers, mykel
OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."