Handling Events
We cover the individual event classes in Chapter 13; every event exposed in the IDE is available via these automation classes. To handle an event in a macro, you need to have two things: an event definition and an event handler.
Every macro project has, by default, an EnvironmentEvents module. This module is automatically created for you every time you create a new macro project, and it implements event definitions for many of the automation events. If you need to handle any of the following event categories, the event definition is already taken care of for you:
• Core DTE events
• Document events
• Window events
• Task List events
• Search events
• Output window events
• Selection events
• Build events
• Solution events
• Solution ...
Get Microsoft® Visual Studio® 2010 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.