storage::SetAttributes

Description

Sets/clears one of the attribute bits to the storage object

Syntax

BOOL SetAttributes( DWORD dwAttrib, BOOL bSet = TRUE )

Parameters

dwAttrib
[input]the bits to be set/cleared
bSet
[input]defaut value is TRUE

Return

Returns no zero if the Attrib was set already, else zero

Examples

EX1

//assume there exists a page in current project before run this code.
void Storage_SetAttributes_ex1()
{
        Page pg = Project.Pages();
        storage st;
        st = pg.GetStorage("system");
        if ( st )
        {
                DWORD dwAttrs = 0x00011001;
                st.SetAttributes(dwAttrs);
                DWORD dwTest1 = 0x00000001;
                DWORD dwTest2 = 0x00000010;
                bool bFlag1 = st.IsAttributes(dwTest1);
                bool bFlag2 = st.IsAttributes(dwTest2);
        }     
        return;
}

Remark

See Also

Storage::IsAttributes

header to Include

origin.h