Udostępnij za pośrednictwem


Extern Element

The Extern element references any external header (.h) files to merge with the .vsct file at compile time. The files to be merged must be on the Include path given to the VSCT compiler or referenced by an Include Element. The files may be other .vsct files or C++ header files.

Definitions in header files must be of the form "#define [Symbol] [Value]" The value may be another symbol if it is previously defined. Definitions may be used in conditional statements of command items. Any symbol not actually used will be discarded.

CommandTable Element
  Extern Element

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

href

Required. The path to the header file:

href="stdidcmd.h"

Condition

Optional. See VSCT XML Schema Conditional Attributes.

language

Optional. The default language of all <Strings> elements in the command table:

language="en-us"

Child Elements

Element

Description

None.

None.

Parent Elements

Element

Description

CommandTable Element

Defines all of the elements that represent commands — that is, menu items, menus, toolbars, and combo boxes — that a VSPackage provides to the IDE.

Example

<?xml version="1.0" encoding="utf-8"?>
<CommandTable xmlns="https://schemas.microsoft.com/VisualStudio/2005-10-
  18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <Extern href="C:\VSCore\vscommon\inc\vsshlids.h"/>
    …
  <Commands package="guidMyPackage">
</CommandTable>

See Also

Concepts

How VSPackages Add User Interface Elements to the IDE

Other Resources

Visual Studio Command Table (.Vsct) Files

Menus and Toolbars