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
N

Nirmal K P

@Nirmal K P
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • [MFC Desktop Application for enumerating Virtual customized folder and files] Windows 8 Address Bar icon problem
    N Nirmal K P

    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
    
    C / C++ / MFC c++ database visual-studio com help
  • Login

  • Don't have an account? Register

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