How can I immediately reload a folder icon when desktop.ini is changed

后端 未结 3 1609
遥遥无期
遥遥无期 2021-01-18 02:00

I\'ve been trying to change folder icon programmatically using changing desktop.ini on the folder. I was able to set an icon, but couldn\'t change it immediately through cha

3条回答
  •  轮回少年
    2021-01-18 02:58

    Example:

    SHFOLDERCUSTOMSETTINGS fcs = {0};
    fcs.dwSize = sizeof(SHFOLDERCUSTOMSETTINGS);
    fcs.dwMask = FCSM_ICONFILE;
    fcs.pszIconFile = iconPath;
    fcs.cchIconFile = 0;
    fcs.iIconIndex = iconIndex;
    SHGetSetFolderCustomSettings(&fcs, folderPath, FCS_FORCEWRITE);
    

提交回复
热议问题