How to Remove the Readonly attribute of a File MFC

前端 未结 1 2025
渐次进展
渐次进展 2020-12-31 11:56

In my MFC application I have set the read only attribute on a particular file. I have done this by using the SetFileAttributes() function. At some point I have

相关标签:
1条回答
  • 2020-12-31 12:12

    Use SetFileAttributes again to reset the flag:

    SetFileAttributes( pszFilename,  
                       GetFileAttributes(pszFilename) & ~FILE_ATTRIBUTE_READONLY);
    
    0 讨论(0)
提交回复
热议问题