How to sort multiple column/rows with a double-click

Override OnLButtonDblClkRowCol and use the following code snippet:

CRowColArray awCols;
  ROWCOL numcols=GetSelectedCols(awCols,TRUE,FALSE);
  CGXSortInfoArray sortInfo;
  sortInfo.SetSize(numcols);
  for (ROWCOL x=0;x<numcols;x++)
  {
   sortInfo[x].nRC = awCols[x];
   sortInfo[x].sortType = CGXSortInfo::autodetect;
   if (pParam->m_nLastSortedCol != nCol || !pParam->m_bSortAscending)
   sortInfo[x].sortOrder = CGXSortInfo::ascending;
   else
   sortInfo[x].sortOrder = CGXSortInfo::descending;