'Fix Warning C26812 with MIDL type library imports

When building an ActiveX control project with Visual C++ 2022, hundreds of "Warning C26812: Prefer 'enum class' over 'enum'" warnings are generated by the type library imports.

Is there a way to fix these warnings (i.e. with a MIDL setting), or must the warning be disabled?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source