4 ms·
>Assigning handlers to the commands defined in a VSCT file is possible through a global service that is available through the IMenuCommandService Good high lev
by ryanmolden 14y ago
>Assigning handlers to the commands defined in a VSCT file is possible through a global service that is available through the IMenuCommandService
Good high level overview, but the above quoted section is incorrect. IMenuCommandService is not a global service, in fact it is somewhat of a faux service as it is available only inside MPF derived types (WindowPane and Package) and each derived type gets its own, isolated instance. It is not how VS itself "does" commands, but rather bus convienence introduced by MPF. You can also assign handlers for commands defined by others (or the shell) in the same way, but package level handlers will only be invoked for the package that defined them.
- eremeevp 14y agoThanks for your feedback!