Skip to content

Latest commit

 

History

History
81 lines (70 loc) · 1.9 KB

File metadata and controls

81 lines (70 loc) · 1.9 KB
title DoesIncludeExist | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
devlang-cpp
ms.tgt_pltfrm
ms.topic article
f1_keywords
DoesIncludeExist
dev_langs
C++
helpviewer_keywords
DoesIncludeExist method
ms.assetid 39751a3d-dfe5-423c-bd94-a53771c3e360
caps.latest.revision 7
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

DoesIncludeExist

Indicates whether a #include statement for a specified header file exists in a file.

Syntax

  
      function DoesIncludeExist(   
   oProj,   
   strHeaderFile,   
   strInsertIntoFile    
);  

Parameters

oProj
The selected project.

strHeaderFile
The name of the header file to find.

strInsertIntoFile
The source file containing the #include statement for the header file (excluding the path).

Return Value

true if the specified header file is included; otherwise false.

Remarks

Indicates whether a #include for a specific header file exists in the file specified by strInsertIntoFile.

Example

// Check to see if #include for atlbase.h   
// is included in the project's stdafx.h.  
// and add it if it is not.  
if (!DoesIncludeExist(selProj, "<atlbase.h>", strSTDAFX))  
   oCM.AddInclude("<atlbase.h>", strSTDAFX, vsCMAddPositionEnd);  

See Also

Customizing C++ Wizards with Common JScript Functions
JScript Functions for C++ Wizards
Creating a Custom Wizard
Designing a Wizard