Jaa


IDE constants

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

The VSConstants class provides constants that are specific to the integrated development environment (IDE) and that were previously defined only in header files.

Logical and physical views

Value Description
Code_guid GUID_VSStandardCommandSet97 cmdidOpenWith handlers should pass this value to the OpenStandardEditor method to get the Open With dialog box, in this case on possible code views.
Debugging_guid GUID_VSStandardCommandSet97 cmdidOpenWith handlers pass this value to the OpenStandardEditor method to get the Open With dialog box, in this case populated with possible Debugging_guid debugging views which map to the same view as Code_guid.
Designer_guid GUID_VSStandardCommandSet97 cmdidOpenWith handlers pass this value to the OpenStandardEditor method to get the Open With dialog box, in this case to View Form designer views.
Primary_guid GUID_VSStandardCommandSet97 cmdidOpenWith handlers pass this value to the OpenStandardEditor method to get the Open With dialog box, in this case the default/primary view of the editor factory.
TextView_guid GUID_VSStandardCommandSet97 cmdidOpenWith handlers pass this value to the OpenStandardEditor method to get the Open With dialog box, in this for a document or data text editor view.
UserChooseView_guid GUID_VSStandardCommandSet97 cmdidOpenWith handlers pass this value to the OpenStandardEditor method which prompts the user to choose which user-defined view to use.

Editor Factory Flags

Value Description
CEF.CloneFile An obsolete flag combined bitwise as the first parameter of the CreateEditorInstance method.
CEF.OpenAsNew Combined bitwise as the first parameter of the CreateEditorInstance, method, this indicates the editor factory should perform necessary fixes.
CEF.OpenFile Combined bitwise as the first parameter of the CreateEditorInstance method, this flag is mutually exclusive of CEF.CloneFile.
CEF.Silent Combined bitwise as the first parameter of the CreateEditorInstance method, this indicates the editor factory should create the editor without displaying a user interface (UI).

Visual Studio errors

Value Description
VS_E_BUSY A constant returned by interfaces to asynchronous behavior when the object in question in already busy
VS_E_INCOMPATIBLEDOCDATA An error HRESULT that is specific to Visual Studio for "Incompatible document data".
VS_E_PACKAGENOTLOADED An error HRESULT that is specific to Visual Studio and that indicates "Package not loaded."
VS_E_PROJECTALREADYEXISTS An error HRESULT that is specific to Visual Studio and that indicates that the "Project already exists."
VS_E_PROJECTMIGRATIONFAILED An error HRESULT that is specific to Visual Studio and that indicates "Project configuration failed."
VS_E_PROJECTNOTLOADED An error HRESULT that is specific to Visual Studio and that indicates "Project not loaded."
VS_E_SOLUTIONALREADYOPEN An error HRESULT that is specific to Visual Studio and that indicates "Solution already open."
VS_E_SOLUTIONNOTOPEN An error HRESULT that is specific to Visual Studio and that indicates "Solution not open."
VS_E_SPECIFYING_OUTPUT_UNSUPPORTED Returned by build interfaces that have parameters for specifying an array from the IVsOutput interface, but the implementation can only apply the method to all outputs.
VS_E_UNSUPPORTEDFORMAT The CreateEditorInstance method returns this value if the document has a format that cannot be opened in the editor.
VS_E_WIZARDBACKBUTTONPRESS An HRESULT value that indicates that the user hit the back button in a Visual Studio wizard.

Visual Studio constants

Value Description
VS_S_PROJECTFORWARDED An error HRESULT that is specific to Visual Studio and that indicates "Project forwarded."
VS_S_TBXMARKER A constant that is specific to Visual Studio for a "Toolbox marker."
VSM_ENTERMODAL A constant that is specific to Visual Studio for broadcasting a notification message via the OnBroadcastMessage method which indicates the beginning of modality.
VSM_EXITMODAL A constant that is specific to Visual Studio for broadcasting a notification message via the OnBroadcastMessage method that indicates the end of modality.
VSM_TOOLBARMETRICSCHANGE A constant that is specific to Visual Studio for broadcasting a notification message via the OnBroadcastMessage method indicating that the command bar metrics have changed.
VSCOOKIE_NIL A constant that is specific to Visual Studio that indicates that a cookie has not been set.
VSITEMID.Nil A Visual Studio item identifier that represents the absence of a project item. This value is used when there is no current selection.
VSITEMID.Root A Visual Studio item identifier that represents the root of a project hierarchy and is used to identify the entire hierarchy, as opposed to a single item.
VSITEMID.Selection A Visual Studio item identifier that represents the currently selected item or items, which can include the root of the hierarchy.

IVsSelectionEvents

Describes what component of the IDE has just been selected, in an OnElementValueChanged call, for example.

Constant Value
SelectionElement.DocumentFrame 0x2
SelectionElement.PropertyBrowserSID 0x4
SelectionElement.StartupProject 0x3
SelectionElement.UndoManager 0x0
SelectionElement.UserContext 0x5
SelectionElement.WindowFrame 0x1

VSSELELEMID

Constants used to indicate a new selection state.

Constant Value
VSConstants.VSSELELEMID 2
VSConstants.VSSELELEMID 7
VSConstants.VSSELELEMID 4
VSConstants.VSSELELEMID 6
VSConstants.VSSELELEMID 3
VSConstants.VSSELELEMID 0
VSConstants.VSSELELEMID 5
VSConstants.VSSELELEMID 1

Component selector dialog constants

Constant Value
CPDN_SELCHANGED WM_USER + 1280
CPDN_SELDBLCLICK WM_USER + 1281
CPPM_CLEARSELECTION WM_USER + 1290
CPPM_GETSELECTION WM_USER + 1287
CPPM_INITIALIZELIST WM_USER + 1285
CPPM_INITIALIZETAB WM_USER + 1288
CPPM_QUERYCANSELECT WM_USER + 1286
CPPM_SETMULTISELECT WM_USER + 1289

See also