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 show system icons in Windows XP 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
31-Jan-03
Category
System
Language
Delphi All Versions
Views
132
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Lou Adler 

I can't get the system icons to show in XP. All works well in Win 98 but in XP no 
icons are loaded. Why?

Answer:

Because in NT each process gets its own imagelist and to minimize resources the 
imagelist is populated on demand. So if the process does not request an image it is 
not loaded. To force it you need to use an undocumeted function:

1   { ... }
2   uses
3     ShellAPI;
4   
5   function FileIconInit(FullInit: BOOL): BOOL; stdcall;
6   type
7     TFileIconInit = function(FullInit: BOOL): BOOL; stdcall;
8   var
9     ShellDLL: HMODULE;
10    PFileIconInit: TFileIconInit;
11  begin
12    Result := False;
13    if (Win32Platform = VER_PLATFORM_WIN32_NT) then
14    begin
15      ShellDLL := LoadLibrary(PChar(Shell32));
16      PFileIconInit := GetProcAddress(ShellDLL, PChar(660));
17      if (Assigned(PFileIconInit)) then
18        Result := PFileIconInit(FullInit);
19    end;
20  end;
21  
22  initialization
23    FileIconInit(True);
24  
25    { ... }


			
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