I'm working on Functions that need "Flags", just like MessageBox.
But, Let's assume i call a function like: void Test(DWORD Flags)
Let's say i put "MB_OK | MB_ICONERROR" (From the MessageBox, just for testing)
How would i find each value? I know how Or, And, Xor works.
It's possible that each flag's value is a power of two, in which case one could easily determine the flags from expressing the resulting value as a sum of powers of two. I don't know the mechanics behind the WinAPI MessageBox, but that's just a possibility. :)
It's a nice idea. I may try giving an eye to the values of MB_OK, etc etc. and post here what i get. Thanks for the idea. EDIT: Yes, they use approximatively that idea. This may explain something:
Depending on the "Section" there are various choices (MB_OK and MB_OKCANCEL cannot be used together), as section i mean: Buttons that will be shown, icon that will be shown...