Bitwise operators
-
I still didn't get the hang of these. We can add a value like so:
uRetVal |= DV_CENTERALL;
But I want to remove a value also if it is present:uRetVal ^= (uRetVal | DV_RIGHT) == uRetVal ? DV_RIGHT : 0;
Is the above correct, or is there an easier better way to do it? -
I still didn't get the hang of these. We can add a value like so:
uRetVal |= DV_CENTERALL;
But I want to remove a value also if it is present:uRetVal ^= (uRetVal | DV_RIGHT) == uRetVal ? DV_RIGHT : 0;
Is the above correct, or is there an easier better way to do it? -
Thanks for that. The '~' operator is not on MSDN, it's in the index, but the page has a large "Empty Index Entry" written across the top. So I am guessing it is the NOT operator?
-
Thanks for that. The '~' operator is not on MSDN, it's in the index, but the page has a large "Empty Index Entry" written across the top. So I am guessing it is the NOT operator?
-
I still didn't get the hang of these. We can add a value like so:
uRetVal |= DV_CENTERALL;
But I want to remove a value also if it is present:uRetVal ^= (uRetVal | DV_RIGHT) == uRetVal ? DV_RIGHT : 0;
Is the above correct, or is there an easier better way to do it?