Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Clipz - A Friendly Introduction to the Windows 7 Taskbar Features

, 17 Dec 2009
An overview of the Windows 7 taskbar features, and how to use then in your own applications.
Clipz.zip
Clipz
bin
Debug
Clipz.csproj.user
CopyIcon.ico
DeleteIcon.ico
Model
Native Methods
Properties
Settings.settings
Resources
Audio.png
Clipboard.png
NextIcon.ico
PreviousIcon.ico
Utility
Core
AppRestartRecovery
Dialogs
Common
TaskDialogs
Interop
AppRestartRecovery
Dialogs
NetworkList
PowerManagement
TaskDialogs
NetworkList
PowerManagement
Properties
PropertySystem
SafeHandles
Libraries
StructureMap.dll
Shell
Common
CommonFileDialogs
Controls
Design
ShellObjects.cd
ShellThumbnailClassDiagram.cd
DesktopWindowManager
ExplorerBrowser
ExplorerBrowserDiagram.cd
Interop
Common
Dialogs
ExplorerBrowser
KnownFolders
PropertySystem
StockIcons
Taskbar
KnownFolders
Properties
PropertySystem
StockIcons
Taskbar
// Copyright (c) Microsoft Corporation.  All rights reserved.

namespace Microsoft.WindowsAPICodePack.Shell
{
    /// <summary>
    /// Represents the different retrieval options for the thumbnail or icon,
    /// such as extracting the thumbnail or icon from a file, 
    /// from the cache only, or from memory only.
    /// </summary>
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags", Justification = "The members of this enum do not represent flags")]
    public enum ShellThumbnailRetrievalOptions
    {
        /// <summary>
        /// The default behavior loads a thumbnail. If there is no thumbnail for the current ShellItem,  
        /// the icon is retrieved. The thumbnail or icon is extracted if it is not currently cached.
        /// </summary>
        Default,

        /// <summary>
        /// The CacheOnly behavior returns a cached thumbnail if it is available. Allows access to the disk,
        /// but only to retrieve a cached item. If no cached thumbnail is available, a cached per-instance icon is returned but  
        /// a thumbnail or icon is not extracted.
        /// </summary>
        CacheOnly = ShellNativeMethods.SIIGBF.SIIGBF_INCACHEONLY,

        /// <summary>
        /// The MemoryOnly behavior returns the item only if it is in memory. The disk is not accessed even if the item is cached. 
        /// Note that this only returns an already-cached icon and can fall back to a per-class icon if 
        /// an item has a per-instance icon that has not been cached yet. Retrieving a thumbnail, 
        /// even if it is cached, always requires the disk to be accessed, so this method should not be 
        /// called from the user interface (UI) thread without passing ShellThumbnailCacheOptions.MemoryOnly.
        /// </summary>
        MemoryOnly = ShellNativeMethods.SIIGBF.SIIGBF_MEMORYONLY,
    }

    /// <summary>
    /// Represents the format options for the thumbnails and icons.
    /// </summary>
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags", Justification = "The members of this enum do not represent flags")]
    public enum ShellThumbnailFormatOptions
    {
        /// <summary>
        /// The default behavior loads a thumbnail. An HBITMAP for the icon of the item is retrieved if there is no thumbnail for the current Shell Item.
        /// </summary>
        Default,

        /// <summary>
        /// The ThumbnailOnly behavior returns only the thumbnails, never the icon. Note that not all items have thumbnails 
        /// so ShellThumbnailFormatOptions.ThumbnailOnly can fail in these cases.
        /// </summary>
        ThumbnailOnly = ShellNativeMethods.SIIGBF.SIIGBF_THUMBNAILONLY,
        
        /// <summary>
        /// The IconOnly behavior returns only the icon, never the thumbnail.
        /// </summary>
        IconOnly = ShellNativeMethods.SIIGBF.SIIGBF_ICONONLY,
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

TylerBrinks
Web Developer PageLabs
United States United States
I'm the founder of PageLabs, a web-based performance and SEO optimization site.

Give your site a boost in performance, even take a free speed test!
 
http://www.pagelabs.com
Follow on   Twitter

| Advertise | Privacy | Mobile
Web03 | 2.8.140902.1 | Last Updated 17 Dec 2009
Article Copyright 2009 by TylerBrinks
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid