Platform SDK Shell >> } How to sort currency in column extension?

by Jeremy Boschen » Thu, 10 Feb 2005 18:57:48 GMT

"Ramon F Herrera" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
>
> and always return the value (in the call to GetItemData) as a string.
> --------------------------------------------------------------------------
>
> What exactly does he mean by "return the value as a string"?
> What does the source code look like?
>

SHCHOLSTATE_TYPE_INT and SHCOLSTATE_TYPE_STR are flags that tell Explorer
how to sort the data returned later, from a call to GetItemData in the
VARIANT* pvarData parameter. This is so that you can return whatever data
type you can stick in a VARIANT and Explorer will *attempt* to sort it using
the method you have requested.

So with the following in GetColumnInfo...

columninfo.csFlags = SHCOLSTATE_TYPE_INT;
columninfo.vt = VT_BSTR;

You would use the following in GetItemData...

pvarData->vt = VT_BSTR;
pvarData->bstrVal = SysAllocString(L"100MB");

Regards,
Jeremy Boschen