Adding Images into the System ImageList ?

I would like to extract the ImageIndex of same Files and show them with the System Image List.

But i need same additional Images. How can i add Images ?

Thanxs
Andi4553Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

robert_marquardtCommented:
It would help if you define what you understand by "system ImageList"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Andi4553Author Commented:
It's the System Image List from SHGetFileInfo

The extraction of the ImageIndex of the Files works fine, but i need to show same additional Images, and i don't know how i can add them to the system Image list.
0
robert_marquardtCommented:
From MSDN SHGetFileInfo:

Note: Once you have a handle to a system image list, you can use the Image List API to manipulate it like any other image list. Because system image lists are created on a per-process basis, you should treat them as read-only objects. Writing to a system image list may overwrite or delete one of the system images, making it unavailable or incorrect for the remainder of the process.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Andi4553Author Commented:
This doesn't help me !
0
Slick812Commented:
hello Andi4553, I agree with robert, the System creates and uses it's System Image List, so if you change it then the system may not use it correctly, or overwrite your changes when it changes the list. . .  What are you trying to do that you think you need to change the System Image List?, , , There's probally some other ways to do it. . . . . You might create your own ImageList and use that for addition Images. . . Look at TImageList
0
Andi4553Author Commented:
I have a TVirtualTreeView (similar to a TListView)
In this list, i show same Files AND i would like to show same "virtual" Links
And the images for this virtual Links are stored in a second ImageList.
0
Slick812Commented:
You might assign the "virtual" links Item List Numbers to unusual numbers (for intance maybe negative numbers or very large numbers) and then just do a Test for for negative numbers (or large number) and then use your own ImageList instead of the System ImageList

if ListNumber < 0 then
UseMyImageList(-ListNumber) else
UseSysList(ListNumber);


or maybe

if ListNumber > 665000 then
UseMyImageList(ListNumber-665000) else
UseSysList(ListNumber);
0
Andi4553Author Commented:
But how can i use two ImageList in one Component ?
I only have one ImageList and for every Node an ImageIndex !
0
Slick812Commented:
there's many ways to do this sort of thing. . . can you show some code? Can you show code for How the ImageIndex is obtained from the Tree for it to get the Image needed, do you use file system reference, like the File Path to get an ImageIndex, or do you set the ImageIndex when the node is created?
0
Andi4553Author Commented:
This is the code for the TVirtualStringTree

procedure TDBFileExplorer.DoGetImageIndex(Node: PVirtualNode; Kind: TVTImageKind; Column: TColumnIndex; var Ghosted: Boolean; var Index: Integer);
var tempFI      : PFileInfo;
begin
    if Column <> 0 then exit;

    tempFI      := GetNodeData(Node);

    if not(Kind in [ikNormal, ikSelected]) then exit;
    Index       := tempFI^.ImageIndex;
end;



The ImageIndex is received at the Create of the TFileInfo class and is the Index of the System Image List.
0
Slick812Commented:
would you know how the values for

tempFI^.ImageIndex

are set???

how do you add your tempFI^.ImageIndex  for your    "virtual" Links    nodes???
0
CleanupPingCommented:
Andi4553:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.