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 to remove that attribute of that file again.
Can anyone explain how to do this?
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 to remove that attribute of that file again.
Can anyone explain how to do this?
Use SetFileAttributes again to reset the flag:
SetFileAttributes( pszFilename,
GetFileAttributes(pszFilename) & ~FILE_ATTRIBUTE_READONLY);