how do I extract a style from a DWORD style
Can someone please tell me how to extract a style or value from a DWORD style.
DWORD dwAttribute = GetFileAttributes( szSomeDirectory );
//FILE_ATTRIBUTE_READONLY from say dwAttribute
I want to know if the file is read only
say ...
if( dwAttribute == FILE_ATTRIBUTE_READONLY )
//.... of course this will not work as there are other attribs has other values...
thanks in advance..
extracting value... from DWORD
I did it this way and it seems to work...
Code:
DWORD dwAttrib = GetFileAttributes( strTemp );
if( dwAttrib == 0xFFFFFFFF ||
dwAttrib == (dwAttrib | FILE_ATTRIBUTE_READONLY))
{
MessageBox("Destination 1 write test failed");
ShowProgressCtrls( FALSE );
return;
}