المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include



C++ Programming
03-31-2009, 02:22 PM
Hi all,

i receive this error please help me how can i solve this.

my stdafx.h looks like this.



// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#if !defined(AFX_STDAFX_H__1EAE1E61_6C55_4340_B919_9DA4E2BE11F0__INCLUDED_)
#define AFX_STDAFX_H__1EAE1E61_6C55_4340_B919_9DA4E2BE11F0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers

//-------------------------------------------------------------------------------//

//#define _WTL_NO_CSTRING
//
#include
#include
#include
extern CAppModule _Module;
#include
#include
#include
#include
#include // WTL enchanced common controls
#include
#include // WTL enhanced msg map macros
#include // ATL collections
#include // WTL DDX support

#import ".\MSO.DLL" \
rename( "RGB", "MSORGB" )

using namespace Office;

#import ".\VBE6EXT.OLB"

using namespace VBIDE;

#import ".\EXCEL.EXE" \
rename( "DialogBox", "ExcelDialogBox" ) \
rename( "RGB", "ExcelRGB" ) \
rename( "CopyFile", "ExcelCopyFile" ) \
rename( "ReplaceText", "ExcelReplaceText" )
//-------------------------------------------------------------------------------//

#include // MFC extensions
#include // MFC Automation classes
#include // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT

#include // MFC socket extensions



please help for this

To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.