Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. [MFC Desktop Application for enumerating Virtual customized folder and files] Windows 8 Address Bar icon problem

[MFC Desktop Application for enumerating Virtual customized folder and files] Windows 8 Address Bar icon problem

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasevisual-studiocomhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nirmal K P
    wrote on last edited by
    #1

    Hi, I am developing a MFC application on Windows 8.1 using VS-2005. Requirement is to customize Folder Explorer for a specific purpose. I want to create own pidl for folder and its contents. When I will open a particular folder, application's should inherit Win-8 Windows explorer. I want to set customized icon for folder on top left corner(On Win-8) and at the root of address bar. I am using GetBindToObject, GetUIObjectOf, CreateViewObject, GetIconLocation and Extract method in ShellFolderImpl class. Please give me some sample source code or idea to do that. I have already studied URL - [http://msdn.microsoft.com/en-us/library/windows/desktop/cc144093%28v=vs.85%29.aspx ] but it is not working. This method is in ShellFolderImpl class BindToObject, CreateViewObject, etc functions are working correctly....... Icon index and Icon is loaded correctly. bcz I saved created icon from Extract method. But emplty icon is placed at specified place on folder as given in above image. 1. IExtractIcon interface is called from GetUIObjectOf method correctly. 2. GetIconLocation method gives correct output Index for Icon. 3. Extract function gives correct output for hIcon. But problem is that Icon assigned to displayed was not correctly displayed at AddressBar and Caption Bar(Top-left corner). Currently, Icon is displayed on AddressBar and Caption Bar(Top-left corner) was empty file icon. when I set :

    HRESULT ExtIcon::ExtractImpl(UINT nIconIndex, HICON* phiconLarge, HICON* phiconSmall)
    {
    phiconLarge = NULL;
    phiconSmall= NULL;
    }

    I got folder icon on the AddressBar and Caption Bar. --------------------------------------------------------------------------------------

    STDMETHODIMP ShellFolderImpl::GetUIObjectOf ( HWND , UINT uCount,
    LPCITEMIDLIST* pPidl, REFIID riid,
    LPUINT, void** ppvReturn )
    {

    try
    {
    
    \*ppvReturn = NULL;
    
    if( uCount != 1 )
       return E\_FAIL;
    
    // IExtractIcon
    if( IsEqualIID(riid, IID\_IExtractIconA)|| IsEqualIID(riid, IID\_IExtractIconW))
    {
        CComObject\* pExtractIcon;
        HRESULT hr = CComObject::CreateInstance ( &pExtractIcon );
        if (FAILED(hr))
            return hr;
        
    
        // Tight its lifetime with this object (the IShellFo
    
    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups