Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to Display the 'Organize Favorite' dialog box Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
Display the 'Organize Favorite' dialog box 25-Jul-04
Category
Internet / Web
Language
Delphi All Versions
Views
251
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
Al Ahmad, Khaled
Reference URL:
			

1   
2   unit Unit1;
3   
4   interface
5   
6   uses 
7     SHDocVw, ShlObj, ShellApi; 
8   
9   type
10    TForm1 = class(TForm)
11      Button1: TButton;
12      procedure Button1Click(Sender: TObject);
13    private
14      { Private declarations }
15    public
16      { Public declarations }
17    end;
18  
19  var
20    Form1: TForm1;
21  
22  function OrganizeFavorite(h: THandle; path: PChar): Boolean; 
23    stdcall external 'shdocvw.dll' Name 'DoOrganizeFavDlg'; 
24  
25  implementation
26  
27  {$R *.dfm}
28  
29  
30  function GetSpecialFolderPath(CallerHandle: THandle; CSIDL: Integer): PChar; 
31  var 
32    exInfo: TShellExecuteInfo; 
33    Buf: PChar; 
34  begin 
35    // initialize all fields to 0 
36    FillChar(exInfo, SizeOf(exInfo), 0); 
37    with exInfo do 
38    begin 
39      cbSize := SizeOf(exInfo);  
40      fMask  := SEE_MASK_FLAG_DDEWAIT or SEE_MASK_IDLIST; 
41      Wnd    := CallerHandle; 
42      nShow  := SW_SHOWNORMAL; 
43      Buf    := StrAlloc(MAX_PATH); 
44      SHGetSpecialFolderPath(wnd, Buf, CSIDL, True); 
45      Result := Buf; 
46    end; 
47  end; 
48  
49  procedure TForm1.Button1Click(Sender: TObject); 
50  begin 
51    OrganizeFavorite(Handle, GetSpecialFolderPath(Handle, CSIDL_FAVORITES)); 
52  end; 
53  
54  


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC