Combining Enum Value using Bitmask
问题 I understand it's possible to use bitmasks in enum values, but I don't know how to create it. I have a simple enum : enum State { minimizing = 0, maximizing, minimized, maximized }; A state is always State.minimized or State.maximized , and can have additional state on resize. So something can be Maximized and minimizing 回答1: I am going to assume that myState has the type of your enum State . The traditional use of enum is to create the constant values that a variable of this type can take.