1
intStyle = intStyle & ~(WS_MINIMIZE);

It is the first time I see this , I am trying to learn how to hook low lvl APIs to C# and make some calls , and I do not understand what this line means. Thank you guys!

Mihail Georgescu
  • 405
  • 3
  • 14

3 Answers3

4

It's an operation on a flag. You need to understand bitoperations (AND, OR, NOT, XOR..) for that. This line deletes the flag WS_MINIMIZE from the intStyle flagmask. More reading: Using Bitwise operators on flags , http://www.codeproject.com/Articles/13740/The-Beginner-s-Guide-to-Using-Enum-Flags.

Maximilian Gerhardt
  • 5,188
  • 3
  • 28
  • 61
4

See this for the & operator.

And this for the ~ operator

They are bitwise operators. The first one is a bitwise AND. The second one performs a bitwise complement operation.

Arthur Rizzo
  • 1,337
  • 15
  • 30
3

This is a bitwise operation.

See for example http://www.codeproject.com/Articles/544990/Understand-how-bitwise-operators-work-Csharp-and-V

ken2k
  • 48,145
  • 10
  • 116
  • 176