?
Solved

Adding Images into the System ImageList ?

Posted on 2003-03-27
14
Medium Priority
?
186 Views
Last Modified: 2010-04-03
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
0
Comment
Question by:Andi4553
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +1
14 Comments
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 1000 total points
ID: 8218019
It would help if you define what you understand by "system ImageList"
0
 

Author Comment

by:Andi4553
ID: 8218066
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
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 8218417
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Andi4553
ID: 8218886
This doesn't help me !
0
 
LVL 34

Assisted Solution

by:Slick812
Slick812 earned 1000 total points
ID: 8219573
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
 

Author Comment

by:Andi4553
ID: 8219620
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
 
LVL 34

Expert Comment

by:Slick812
ID: 8219714
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
 

Author Comment

by:Andi4553
ID: 8219746
But how can i use two ImageList in one Component ?
I only have one ImageList and for every Node an ImageIndex !
0
 
LVL 34

Expert Comment

by:Slick812
ID: 8227288
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
 

Author Comment

by:Andi4553
ID: 8229866
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
 
LVL 34

Expert Comment

by:Slick812
ID: 8230762
would you know how the values for

tempFI^.ImageIndex

are set???

how do you add your tempFI^.ImageIndex  for your    "virtual" Links    nodes???
0
 

Expert Comment

by:CleanupPing
ID: 9316577
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question