There isn't a need to hardcode the original value; just check and change.;; toggle the current cursor color from 40 to white (and vise versa)
But here white is arbitrarily hardcoded as a default.
No it is not (you must not have tried it). I'm just using either a LOGIOR (7) or XOR (6) to set or clear a bit(s).
It is; and no, I don't need to try it as I can see & understand the operations being performed.
Firstly, the
cond statement to change the boole operator seems redundant, as 16777215 (2
24-1) represents OLE 255,255,255 which is the largest possible value, and so
(<= currentvalue 16777215) will always be true, which means the expression may become a simple
XOR of the current value and
16728064 = 16777215 XOR 49151 (colour 40). Hence, for colour 40 you have essentially arbitrarily hardcoded white as the alternative colour (as I noted earlier); for all other colours, the default becomes the
XOR of the current colour with
16728064.