| title | DoesIncludeExist | Microsoft Docs | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||||||
| ms.date | 11/04/2016 | |||||||||||||
| ms.reviewer | ||||||||||||||
| ms.suite | ||||||||||||||
| ms.technology |
|
|||||||||||||
| ms.tgt_pltfrm | ||||||||||||||
| ms.topic | article | |||||||||||||
| f1_keywords |
|
|||||||||||||
| dev_langs |
|
|||||||||||||
| helpviewer_keywords |
|
|||||||||||||
| ms.assetid | 39751a3d-dfe5-423c-bd94-a53771c3e360 | |||||||||||||
| caps.latest.revision | 7 | |||||||||||||
| author | mikeblome | |||||||||||||
| ms.author | mblome | |||||||||||||
| manager | ghogen | |||||||||||||
| translation.priority.ht |
|
Indicates whether a #include statement for a specified header file exists in a file.
function DoesIncludeExist(
oProj,
strHeaderFile,
strInsertIntoFile
);
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).
true if the specified header file is included; otherwise false.
Indicates whether a #include for a specific header file exists in the file specified by strInsertIntoFile.
// 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);
Customizing C++ Wizards with Common JScript Functions
JScript Functions for C++ Wizards
Creating a Custom Wizard
Designing a Wizard