The syntax of my question is likely to be totally incorrect! This is what I meant:

When a function recieves a single variable that contains a set of flags seperated by the bitwise operator, how does it read those values and how are those values defined? i.e. I would like to write my own function that will take a set of flags as an argument.

e.g.
// Declaration
int Function(DWORD flags);

// Usage
i = Function(FLAG_X | FLAG_Y | FLAG_Z);

// Function Code:
?????????!

Hope this makes sense, and thanks in advance

dt