--- title: "helpcontext | Microsoft Docs" ms.custom: "" ms.date: "11/04/2016" ms.reviewer: "" ms.suite: "" ms.technology: - "cpp-windows" ms.tgt_pltfrm: "" ms.topic: "language-reference" f1_keywords: - "vc-attr.helpcontext" dev_langs: - "C++" helpviewer_keywords: - "helpcontext attribute" ms.assetid: 6fbb022d-a4b7-4989-a02f-7f18a9b0ad96 caps.latest.revision: 10 author: "mikeblome" ms.author: "mblome" manager: "ghogen" translation.priority.ht: - "cs-cz" - "de-de" - "es-es" - "fr-fr" - "it-it" - "ja-jp" - "ko-kr" - "pl-pl" - "pt-br" - "ru-ru" - "tr-tr" - "zh-cn" - "zh-tw" --- # helpcontext Specifies a context ID that lets the user view information about this element in the Help file. ## Syntax ``` [ helpcontext( id ) ] ``` #### Parameters `id` The context ID of the help topic. See [HTML Help: Context-Sensitive Help for Your Programs](../mfc/html-help-context-sensitive-help-for-your-programs.md) for more information on context IDs. ## Remarks The **helpcontext** C++ attribute has the same functionality as the [helpcontext](http://msdn.microsoft.com/library/windows/desktop/aa366851) MIDL attribute. ## Example See the example for [defaultvalue](../windows/defaultvalue.md) for an example of how to use **helpcontext**. ## Requirements ### Attribute Context ||| |-|-| |**Applies to**|`interface`, `typedef`, **class**, method, property| |**Repeatable**|No| |**Required attributes**|None| |**Invalid attributes**|None| For more information, see [Attribute Contexts](../windows/attribute-contexts.md). ## See Also [IDL Attributes](../windows/idl-attributes.md) [Interface Attributes](../windows/interface-attributes.md) [Class Attributes](../windows/class-attributes.md) [Method Attributes](../windows/method-attributes.md) [Typedef, Enum, Union, and Struct Attributes](../windows/typedef-enum-union-and-struct-attributes.md) [helpfile](../windows/helpfile.md) [helpstring](../windows/helpstring.md)