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
SetFileAttributes()
Use SetFileAttributes again to reset the flag:
SetFileAttributes( pszFilename, GetFileAttributes(pszFilename) & ~FILE_ATTRIBUTE_READONLY);