Thread: how do I extract a style from a DWORD style

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    223

    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..
    zMan

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    223

    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;
    }
    zMan

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help calling function is asm
    By brietje698 in forum C++ Programming
    Replies: 24
    Last Post: 12-06-2007, 04:48 PM
  2. Inline asm
    By brietje698 in forum C++ Programming
    Replies: 5
    Last Post: 11-11-2007, 02:54 PM
  3. Getting position from game..
    By brietje698 in forum C++ Programming
    Replies: 1
    Last Post: 10-26-2007, 12:15 PM
  4. storage size of regs is unkown
    By Vertex34 in forum C Programming
    Replies: 5
    Last Post: 11-04-2003, 10:17 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM