Article View: borland.public.cppbuilder.nativeapi
Article #14056Re: SHGetSpecialFolderLocation!
From: Rodolfo Frino
Date: Mon, 25 Aug 2003 05:34
Date: Mon, 25 Aug 2003 05:34
66 lines
2471 bytes
2471 bytes
Set the TListView::SortType property to the value you want (stNone, stBoth,
stData, stText)
(stNone is the default)
For example:
ListView->SortType = stText;
Bear in mind that
ListView->SortType = stBoth; //1
ListView->SortType = stData; //2
ListView->SortType = stText; //3
only work if ListView->OwnerDraw = false;
Also remember that once you have sorted the ListView using 1, 2 or 3,
if the order of the items has been altered, you cannot get the previous
order by setting SortStyle to stNone:
ListView->SortType = stNone;
Rodolfo
"Safari" <Safari@alloymail.com> wrote in message
news:3F48E399.60108@alloymail.com...
> Thanks Rodolfo,
> Question :-)
>
> I want to soty my list but i can't!
> ListView->SortType = TSortType() << Listactns::stNone;
> ListView->SortType = TSortType() << Listactns::stBoth;
> // Or others ...
>
> Note:
> // ListsView.SortType := stNone;
> // ListsView.SortType := stBoth;
> // Or other
>
> is OK.
>
> Thanks again,
> Safari
>
> | But it is not :-)
>
> | String GetSpecialFolderPath(HWND Handle, int FolderNumber)
> | {
> | LPITEMIDLIST pID_List;
> | String R = "";
> |
> | if (!SHGetSpecialFolderLocation(Handle, FolderNumber, &pID_List))
> | {
> | char SpecialFolderPath[MAX_PATH + 1] = {0};
> |
> | if (SHGetPathFromIDList(pID_List, SpecialFolderPath))
> | R = SpecialFolderPath;
> |
> | CoTaskMemFree(pID_List);
> | }
>
> | return R;
> | }
>
> | Rodolfo
>
Technical Details
Message-ID:
<3f499fcc@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3F48E399.60108@alloymail.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,7ce38efab0f8f813 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-24 22:36:51 PST From: "Rodolfo Frino" <rodolfofrino@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3F48E399.60108@alloymail.com> Subject: Re: SHGetSpecialFolderLocation! Date: Mon, 25 Aug 2003 15:34:23 +1000 Lines: 68 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 203.206.23.34 Message-ID: <3f499fcc@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1061789644 203.206.23.34 (24 Aug 2003 22:34:04 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail