讲解IShellChangeNotify的内容网页,小弟深表感谢

解决方案 »

  1.   

    STDMETHODIMP CMyShellChangeNotify::OnChange(LONG lEvent, 
                                                LPCITEMIDLIST pidl1, 
                                                LPCITEMIDLIST pidl2)
    {
        HRESULT hr = E_FAIL;
        int iImage;    switch(lEvent)
        {
            // An image in the system image list has changed.
            case SHCNE_UPDATEIMAGE:
            {
                hr = S_OK;            if (pidl2)
                    iImage = SHHandleUpdateImage(pidl2);
                else
                    iImage = *(int UNALIGNED *)((BYTE *)pidl1 + 2);
                   
                if (iImage != -1)
                {
                    // Process iImage as desired.
                }
                break;
            }
            // Other cases
        }
        return hr;
    }
    http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shhandleupdateimage.asp