CPB Mailing List
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CustomSort() Metod in TTreeView
> I try to use CustomSort() metod in TTreeViev.
> I take some code from example in help about this metod,
> but it does not work!!!
>
> Maybe i stupid - but please help me...
>
No, not stupid.
there is an error in the treeview
there's a different between the source an the headerfile.
The function prototype:
PNTVCOMPARE is defined as int(*)(long,long,long)
in the Lib:
PNTVCOMPARE is used as int(*)(int,int,int)
So you see where the error is, the function is called correct,
the definition is incorrect, and thus the message
linker error "Unresolved ... in main.obj":
int __stdcall __export CompareFunc(long,long,long)
{
return 0;
}
Here how to solve the problem:
modify commctrl.h like this:
typedef int(CALLBACK *PFNTCOMPARE)
(LPARAM lParam1,LPARAM lParam2,LPARAM lParamSort);
with
typedef int(CALLBACK *PFNTCOMPARE)
(int lParam1,int lParam2,int lParamSort);
That's all, good luck <g>
Mike Harris
W Komornicki's Home Page |
Main Index |
Thread Index