BExplorer.Shell.ShellView.SetFolderIcon C# (CSharp) Méthode

SetFolderIcon() public méthode

Sets the folder's icon
public SetFolderIcon ( String wszPath, String wszExpandedIconPath, Int32 iIcon ) : void
wszPath String ??
wszExpandedIconPath String ??
iIcon Int32 ??
Résultat void
    public void SetFolderIcon(String wszPath, String wszExpandedIconPath, Int32 iIcon) {
      var fcs = new Shell32.LPSHFOLDERCUSTOMSETTINGS() { iIconIndex = iIcon, cchIconFile = 0, dwMask = Shell32.FCSM_ICONFILE };
      fcs.dwSize = (UInt32)Marshal.SizeOf(fcs);
      fcs.pszIconFile = wszExpandedIconPath.Replace(@"\\", @"\");
      // Set the folder icon
      HResult hr = Shell32.SHGetSetFolderCustomSettings(ref fcs, wszPath.Replace(@"\\", @"\"), Shell32.FCS_FORCEWRITE);
      if (hr == HResult.S_OK) this.UpdateIconCacheForFolder(wszPath); // Update the icon cache			
      this.RefreshItem(this._SelectedIndexes[0], true);
    }
ShellView