I want a Visual Studio plugin to collapse C++ code in visual. For example, I want to collapse the statements in a if block (as shown below). I know Visual Studio has the “outline” menu, but it doesn’t seem to work well for me because it sometimes collapses macro defines and other things.
Does anyone know of a tool that can help me?

You need to enable this feature :
Tools -> Options -> Text Editor -> C/C++ -> Formatting -> check everything in “outlining”
Then, reopen the source file to reload outlining.
(PS. This works at least in Visual Studio 2008.)