Sort list (numeric/text/float/date) using callback
i refer to
http://www.codeguru.com/Cpp/controls...cle.php/c1055/
this guy had an excellent class, but unforturnately i cant get it to work due to compile errors and problems with the variable "m_arrColType"
forturnately he added a comment to tell us what is "m_arrColType"
unforturnately i cannot go to the comment page and was booted to the "sitemap" map
compile error:
Quote:
C:\Program Files\Microsoft Visual Studio\xxxxxpg_control_report.cpp(223) : error C2065: 'm_arrColType' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\xxxxxxpg_control_report.cpp(223) : error C2109: subscript requires array or pointer type
Error executing cl.exe.
AClient.exe - 2 error(s), 0 warning(s)
i tried
Code:
void pg_control_report::OnHeaderClicked(NMHDR* pNMHDR, LRESULT* pResult)
{
static int nSortedCol = -1;
static bool bSortAscending = true;
HD_NOTIFY *phdn = (HD_NOTIFY *) pNMHDR;
if( phdn->iButton == 0 )
{
// User clicked on header using left mouse button
if( phdn->iItem == nSortedCol )
bSortAscending = !bSortAscending;
else
bSortAscending = TRUE;
nSortedCol = phdn->iItem;
CSortClass csc(this, nSortedCol);
long m_arrColType[200];
csc.Sort(bSortAscending, (CSortClass::EDataType)
m_arrColType[nSortedCol]);
}
*pResult = 0;
}
but the code doesnt work
can anyone please tell me what is "m_arrColType" at the ending of the page?
:wave: