The Extract Define refactoring helps you simplify complicated statements in your code by defining the selected set of tokens as macro using #define directive and replacing the set of tokens with macro call in the code; macro definition can be located in the current file or moved to the related header file.

For example, in the code fragment below, you could select an expression in the code

and press &shortcut:CIDR.Lang.IntroduceDefine; (Refactor | Extract Define).

This will result in the following: