Курсовая работа: Характеристика Win32
hdi.fmt &= ~(HDF_BITMAP|HDF_BITMAP_ON_RIGHT);
}
else
{
hdi.mask |= HDI_BITMAP;
hdi.fmt |= HDF_BITMAP|HDF_BITMAP_ON_RIGHT;
hdi.hbm = (nOrder > 0)? m_bmSortDown: m_bmSortUp;
}
_VERIFY (hdr. SetItem (i, &hdi));
}
}
// –
// SortCallback
int
CALLBACK
CMainFrame: SortCallback (LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
{
CItemData * pData1 = (CItemData *) lParam1;
CItemData * pData2 = (CItemData *) lParam2;
_ASSERTE (_CrtIsValidHeapPointer(pData1));
_ASSERTE (_CrtIsValidHeapPointer(pData2));
int nRes;
switch (abs(lParamSort))
{
// sort on process identifiers
case 1:
nRes = (int) pData2->dwProcessId – (int) pData1->dwProcessId;
break;
// sort on process names