how do I extract a style from a DWORD style

This is a discussion on how do I extract a style from a DWORD style within the Windows Programming forums, part of the Platform Specific Boards category; Can someone please tell me how to extract a style or value from a DWORD style. DWORD dwAttribute = GetFileAttributes( ...

  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, 03:48 PM
  2. Inline asm
    By brietje698 in forum C++ Programming
    Replies: 5
    Last Post: 11-11-2007, 01: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, 09:17 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21