Unit SystemImageList |
Standard defines for all Delphi Free Stuff components } {-----------------------------------------------------------------------------} { TSystemImageList v1.00 Beta 2 } {-----------------------------------------------------------------------------} { A component to extend the TImageList so that it gives access to the system } { image list. } { Copyright 1998, Brad Stowers. All Rights Reserved. } { This component can be freely used and distributed in commercial and private } { environments, provied this notice is not modified in any way and there is } { no charge for it other than nomial handling fees. Contact me directly for } { modifications to this agreement. } {-----------------------------------------------------------------------------} { Feel free to contact me if you have any questions, comments or suggestions } { at bstowers@pobox.com. } { The lateset version will always be available on the web at: } { http://www.pobox.com/~bstowers/delphi/ } { See SystemImageList.txt for notes, known issues, and revision history. } {-----------------------------------------------------------------------------} { Date last modified: June 2, 1998 } {-----------------------------------------------------------------------------} {CE_Desc_Begin(SystemImageList.pas)} {This unit provides the <%LINK TSystemImageList%> component which extends \ the TImageList so that it gives access to the Win32 system image list. The \ system image list is a list of images owned by the Win32 operating system \ that is made up of all the images the OS uses in things like Explorer.} {CE_Desc_End
Classes |
TSystemImageList - CE_Desc_Begin(TSystemImageList)} {TSystemImageList component which extends the TImageList component so that \
it gives access to the Win32 system image list.
Functions |
GetFileInfo - CE_Desc_Begin(GetFileInfo)} {This function is exactly the same as <%BOLD%><%LINK GetIconIndex%><%BOLD0%> \
except that it takes an extra variable parameter that is assigned the system \
description for the file.
GetIconIndex - CE_Desc_Begin(GetIconIndex)} {Retrieves the index into the system image list of a file or directory item.
GetSystemImageList - CE_Desc_Begin(GetSystemImageList)} {<%BOLD%>GetSystemImageList<%BOLD0%> is a function that is can be used to get \
the handle of the system's large and small image list.
Register -
Types |
TImageSize
TSystemFileAttribute
TSystemFileAttributes
Constants |
Variables |
Functions |
File doesn't exist, so Windows doesn't know what to do with it. We have to tell it by passing the attributes we want, and specifying the SHGFI_USEFILEATTRIBUTES flag so that the function knows to use them.
SHGetFileInfo puts the requested information in the SFI variable, but it also can return the handle of the system image list. We just pass an empty file because we aren't interested in it, only the returned handle.
Types |
TImageSize = (isLarge, isSmall);
TSystemFileAttribute = (sfaReadOnly, sfaHidden, sfaSystem, sfaDirectory, sfaArchive, sfaNormal, sfaTemporary ,sfaCompressed, sfaOffline);TSystemFileAttribute is used to provide a Delphi-ish interface for the various Win32 file attributes.
TSystemFileAttributes = set of TSystemFileAttributeTSystemFileAttributes is a set of TSystemFileAttribute. This allows you to provide more than a single attribute at one time.
Constants |
Variables |