Contents Index Topic Contents | ||
Previous Topic: IExtractIcon::Extract Next Topic: IFileViewer |
IExtractIcon::GetIconLocation
HRESULT GetIconLocation( UINT uFlags, LPSTR szIconFile, INT cchMax, LPINT piIndex, UINT *pwFlags );Retrieves the location and index of an icon.
- Returns NOERROR if the function returned a valid location, or S_FALSE if the shell should use a default icon.
- uFlags
- Flags. This parameter can be zero or one or more of the following values:
GIL_ASYNC The calling application supports asynchronous retrieval of icons. If the icon is cached by the receiving application, it should supply the icon and return S_OK. If the icon is not cached and must be retrieved, the receiving application should start an asynchronous icon retrieval operation, supply a default icon, and return E_PENDING. This method will be called again at a later time to attempt to retrieve the icon again. GIL_FORSHELL The icon is to be displayed in a shell folder. GIL_OPENICON The icon should be in the open state if both open- and closed-state images are available. If this flag is not specified, the icon should be in the normal or closed state. This flag is typically used for folder objects. - szIconFile
- Address of the buffer that receives the icon location. The icon location is a null-terminated string that identifies the file that contains the icon.
- cchMax
- Size of the buffer that receives the icon location.
- piIndex
- Address of an INT that receives the icon index, which further describes the icon location.
- pwFlags
- Address of a UINT value that receives zero or a combination of the following values:
GIL_DONTCACHE The physical image bits for this icon should not be cached by the caller. This distinction is important to consider because a GIL_DONTCACHELOCATION flag may be introduced in future versions of the shell. GIL_NOTFILENAME The location is not a file name/index pair. Callers that decide to extract the icon from the location must call this object's IExtractIcon::Extract method to obtain the desired icon images. GIL_PERCLASS All objects of this class have the same icon. This flag is used internally by the shell. Typical implementations of IExtractIcon do not require this flag because the flag implies that an icon handler is not required to resolve the icon on a per-object basis. The recommended method for implementing per-class icons is to register a DefaultIcon for the class. GIL_PERINSTANCE Each object of this class has its own icon. This flag is used internally by the shell to handle cases like Setup.exe, where objects with identical names can have different icons. Typical implementations of IExtractIcon do not require this flag. GIL_SIMULATEDOC The caller should create a document icon using the specified icon. See also IExtractIcon::Extract
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.