WINDOWS.H already included. MFC apps must not #include <windows.h>

Hi All

I getting an error message "WINDOWS.H already included.  MFC apps must
not #include <windows.h>" However i not including windows.h anywhere in
my project.


Can you help

Many Thanks

Tom

Below is a copy of my stdafx.h



// 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__6B703139_63DB_11D5_B5D1_4324324324822__INCLUDED_)
#define AFX_STDAFX_H__6B703139_63DB_11D5_B5D1_4324324324822__INCLUDED_

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



#include <atlbase.h>
#if _ATL_VER >= 0x0700
	#include <atlcoll.h>
	#include <atlstr.h>
	#include <atltypes.h>
	#define _WTL_NO_CSTRING
	#define _WTL_NO_WTYPES
#else
	#define _WTL_USE_CSTRING
#endif

#include <atlapp.h>

extern CAppModule _Module;

#include <atlmisc.h>
#include <atlcom.h>
#include <atlhost.h>
#include <atlwin.h>
#include <atlctl.h>

#include <atlframe.h>
#include <atlctrls.h>
#include <atldlgs.h>
#include <atlctrlw.h>



#include "atlgdix.h"
#include "CustomTabCtrl.h"
#include "DotNetTabCtrl.h"
#include "SimpleTabCtrls.h"
//#include "SimpleDlgTabCtrls.h"
#include "TabbedFrame.h"
//#include "TabbedMDISave.h"
#include "ListViewNoFlicker.h"

#define _TABBEDMDI_MESSAGES_EXTERN_REGISTER
#define _TABBEDMDI_MESSAGES_NO_WARN_ATL_MIN_CRT
#include "TabbedMDI.h"

#ifndef _AFX_NO_AFXCMN_SUPPORT
	#include <afxcmn.h>			// MFC support for Windows Common Controls
#endif





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

#include "Resource.h"
#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions
#include <afxcview.h>
#include <afxdisp.h>        // MFC Automation classes
#include <afxdtctl.h>		// MFC support for Internet Explorer 4 Common
Controls
#include <afxole.h>
#include <afxpriv.h>
#include <shlobj.h>     // IShellFolder support
#include <afxmt.h>
#include <lm.h>
#include <afxtempl.h>



#include <afxdhtml.h>
#include <afxdlgs.h>



//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately
before the previous line.

#endif //
!defined(AFX_STDAFX_H__6B703139_63DB_11D5_B5D1_4324324324822__INCLUDED_)

0
twt (1)
4/25/2006 8:25:51 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
927 Views

Similar Articles

[PageSpeed] 22

"Thomas Turner" <twt@somcom.co.uk> wrote in message
news:1145953551.900797.289620@t31g2000cwb.googlegroups.com...
>
> I getting an error message "WINDOWS.H already included.  MFC apps must
> not #include <windows.h>" However i not including windows.h anywhere in
> my project.

These are a right ****** to sort out, particularly when some of the code you
are building has to be portable to other platforms so some of the headers
you are including have not been written for MFC.

There's a compiler option that outputs a nested list of all the headers
included, that's essential information for trying to work out what's going
on.

The culprit may (after you've spent happy hours unravelling many levels of
includes) turn out to be some database header, or some tracing header, or
something else.

--
Tim Ward
Brett Ward Limited - www.brettward.co.uk


0
tw2 (223)
4/25/2006 12:52:33 PM
Reply:

Similar Artilces:

ASP Files not working windows VISTA IIS..
Hi..please advice how do i run asp files in my localhost and i'm using windows vistasundar ...

reinstalling windows
windows has become corrupted. when i have attempted to reinstall windows the set up screen tells me " the file cmdide.sys is corrupted. press any key to continue". at the bottom of the screen it says " setup failed". do i need to format the disc so that i can reinstall windows and if so, how do i do it? thanks, mike mikalle wrote: > windows has become corrupted. when i have attempted to reinstall windows the > set up screen tells me " the file cmdide.sys is corrupted. press any key to > continue". at the bottom of the screen it says &qu...

Windows live mail
My windows live mail account will not send or recieve any messages. Every time I attempt to send an email. I get this message... windows cannot send this message you need a digital id, this message is not encrypted. I have tried to download a program for a digital id but this has not solved the problem. Dew "Dew" wrote: > My windows live mail account will not send or recieve any messages. Every > time I attempt to send an email. I get this message... windows cannot send > this message you need a digital id, this message is not encrypted. I have >...

Windows Vista
Not sure whats going on, but when I opened Windows Mail this afternoon I decided not to send any emails and generates the message :- The connection to the server has failed. Subject 'test 1', Account: 'pop.123-reg.co.uk', Server: 'smtp.123-reg.co.uk', Protocol: SMTP, Port: 25, Secure(SSL): No, Socket Error: 10060, Error Number: 0x800CCC0E I had this a few weeks ago and on going into account properties and clicking on and off the various Connection tick boxes, the problem cleared. However this time there is no change. Any Ideas ?? Submitted via EggHeadCafe -...

open windows
How do I close ALL open windows w/ ONE click Post Originated from http://www.VistaForums.com Vista Support Forums "kotus" wrote in message news:%23QO5zHhnKHA.1548@TK2MSFTNGP06.phx.gbl... > How do I close ALL open windows w/ ONE click > If you can tolerate an extra click, you can right-click the group of windows in your task bar > Close group Otherwise you'd probably need a mini-app that with a desktop shortcut that does what you want. -- Jon On Mon, 25 Jan 2010 14:58:46 -0800, kotus wrote: > How do I close ALL open windows w/ ONE...

Windows pdate Status: Failed
Hi, This is my problem: http://yfrog.com/1fupdatekj So, how can I manage to install this update? I am using Acer Laptop with its own Vista and HP LP2275w monitor. Thanks in advance. Koray For home users, no-charge support is available by calling 1-866-PCSAFETY (and/or 1-866-234-6020) in the United States and in Canada or by contacting your local Microsoft subsidiary. There is no-charge for support calls that are associated with security updates. When you call, clearly state that your problem is related to a Security Update and cite the update's KB number (e.g., KB9999...

Unknown 12029 while using window.ActiveXObject & window.XMLHttpRequest
Hi, I am using the following code in my .jsp file for request to, and get a response from a web server - without reloading the page. But this code is working if i will use http://localhost:8080/.../xxx.jsp. But if i will call remotely like http://12.12.12.1111:8080/.../xxx.jsp it's throwing "Unknown 12029" Exception. Kindly let me know what changes i should do. Plz explain me detailly on this. // code for Mozilla, Netscape, etc... if (window.XMLHttpRequest) { req=new XMLHttpRequest() req.onreadystatechange=state_Change req.open("GET",urlT,true) ...

Windows Explorer doesn't show keywords
When I use Windows Explorer to navigate and search through my files (using the View - choose details - keywords and other selections) I can't see the keywords - even though they are part of the file (can view in file properties). I can see the Author, Title, Subject, Category, Comments - everything that is in the file properties except keywords. Is there a setting I'm not selecting? -- David C. Beveridge -------- Original-Nachricht -------- > When I use Windows Explorer to navigate and search through my files (using > the View - choose details - keywords a...

Outlook Mail not working with Windows 7
I have Windows 7 Home Premium (64 Bit) and Office 2003 Pro. I setup my POP3 e-mail account and was able to send and receive mail once. I setup a second POP3 account and neither will work. I installed Outlook 2007 with the same result. From what I have read, the 32 bit OS does not have this problem. So far, no one has been able to come up with a work around for this. Any help will be appreciated. Its nothing to do with win32/64 When you test the accounts within Outlook, you should if theres a problem see some relevent err msgs "ernie146nn" <ernie146nn@discussions...

windows 98 computer, running Office 2000, I deleted Outlook.pst thru windows explorer.
Please help, Outlook stoped recieving emails and said the problem was the Outlook.pst file. 1st. I tried reloading Office 2000 "did not help" 2nd. I deleted the Outlook.pst file on my windows 98 Computer running Office 2000 thru windows explorer The file was too large for the recycle bin and I chose delete. 3rd. Then I tried re installing office 2000 again and it did not reinstall the "outlook.pst file" Now I know that all my emails were in that .pst I have tried FINAL DATA 2.0 recovery software thru another hard drive and had no success finding the .pst file, where ...

Windows recovery console
How can I stop Windows Recovery Console coming up at Windows startup. There are a number of StartUp folders and none of them list WRC In news:%23qYZva4QLHA.4960@TK2MSFTNGP05.phx.gbl, tatar typed on Tue, 24 Aug 2010 13:20:08 +0100: > How can I stop Windows Recovery Console coming up at Windows startup. > There are a number of StartUp folders and none of them list WRC You have added the Windows Recovery Console to your HDD? Anyway to change the default boot OS all you need to do is: Control Panel System Advanced (tab) Startup and Recovery (Settings) Default operatin...

difference between window dimensions and window client area dimensions
I need to find the difference between window dimensions and window client area dimensions for an SDI application. Currently I'm using the brute force method: CRect clientRect; GetClientRect(&clientRect); CRect mainRect; GetWindowRect(&mainRect); int frameExtraX = mainRect.Width() - clientRect.Width(); int frameExtraY = mainRect.Height() - clientRect.Height(); This is ugly and doesn't always work, so I would like to get frameExtraX and frameExtraY from some kind of system metrics values. Thank you! You've already said the magic words "system metrics&q...

windows messenger/Outlook 2002
Hello........i am running office xp 2002 on windows xp professional and every time that i open up outlook 2002, windows messgenger 6.0 opens up...windows messenger is not even on the list of programs automatically set to open up on the Start up programs tab...can anybody help and tell why this is happening?....thanks...Rolf disable messenger integration on tools, options, other Renegade wrote: > Hello........i am running office xp 2002 on windows xp > professional and every time that i open up outlook 2002, > windows messgenger 6.0 opens up...windows messenger is > not e...

Windows update error
I get the follow messege when i try and run a windows update. Files required to use Windows Update are no longer registered or installed on your computer. To continue: Register or reinstall the files for me now (Recommended) Let me read about more steps that might be required to solve the problem What to thye mean by redister or reinstall filles. How do i do it? Adam wrote: > I get the follow messege when i try and run a windows update. > > Files required to use Windows Update are no longer registered or > installed on your computer. To continue: > > ...

how to transfer email from window xp to window 7
wOULD ANY ONE PLS LET ME KNOW THE STEPS OF HOW I COULD TRANSFER EMAIL MESSAGES FROM OUTLOOK EXPRESS TO WINDOW 7 VERSION You don't do it through Microsoft Word, the topic of this newsgroup. "Dummies for win7" <Dummies for win7@discussions.microsoft.com> wrote in message news:0DF468BF-FEE6-4BDD-8292-38000059C489@microsoft.com... : wOULD ANY ONE PLS LET ME KNOW THE STEPS OF HOW I COULD TRANSFER EMAIL : MESSAGES FROM OUTLOOK EXPRESS TO WINDOW 7 VERSION ...

Windows Update kills Windows Mail on Windows 7
If you have installed Windows Mail on a Windows 7 computer, yesterday's update contains a KB978542 patch which changes msoe.dll so it won't run on Windows 7. I had warned about these types of issues when Win7 was first released. Microsoft claims it was done for security=20 reasons, see http://www.microsoft.com/technet/security/bulletin/ms10-030.mspx To get it working again, replace the new non-working copy of msoe.dll in Windows 7 with a copy of the new patched version of msoe.dll from a Vista machine.=20 Note: I ran into permissions issues when trying to delete the = no...

How Do I Remove Page # From Cover Sheet w/ Windows 2007?
I am writing a paper in Windows 2007 and cannot have a page number on the cover sheet. Help! Thanks : ) Presumably you mean Word 2007 since (a) there is no Windows 2007 and (b) Windows is not a word processor. Click in the header/footer to open it. In the Options group of the contextual Header & Footer Tools | Design tab, check the box for "Different First Page." Leave the First Page Header/Footer empty. If you need to start the numbering with 1 on the the second page, click on Page Number, choose Format Page Numbers, and change the "Page numbering" set...

We can't sign you in to Windows Live Messenger
For several days I've been unable to sign in to Windows Live Messenger. I keep getting the same error: "Signing in to Windows Live Messenger failed because the service is temporarily unavailable. Please try again later" Error code 80048820 I've clicked troubleshoot to try to fix this problem, but troubleshoot couldn't find anything wrong. I've tried to reset my password, but this doesn't seem to work, because on the change password page I have to enter those security numbers and letters but they don't appear. When I listened to the audio and...

Windows Workflow Foundation
Any one know of a good VB example on the above subject.. any links would be greatful Simon After much searching and trawling through C# examples that as its friday i didn't want to convert.. http://www.microsoft.com/downloads/details.aspx?familyid=2e575633-e357-4ee7-aaff-34138f00e830&displaylang=en Simon "Simon Whale" <simon@nospam.com> wrote in message news:%23zfF5ScwKHA.1692@TK2MSFTNGP04.phx.gbl... > Any one know of a good VB example on the above subject.. any links would > be greatful > > > Simon > ...

windows mail window
When I press send or receive, I get the emails but an error message appears. There is nothing left in the draft file and I eliminated the email that wouldn't go through. I want to clear this message from the windows mail window. Please help me. Jackie Carpenter What does the error message say? Right-click on it, select Copy, then paste it into a reply here. -- Windows 7 Ultimate http://get.live.com/wlmail/overview http://download.live.com/wlmail "jwcarpenter" <jwcarpenter@discussions.microsoft.com> wrote in message news:2B5D0223-EE44-4C4E-9...

Non English fonts (Greek) not working in Windows XP SP3
I had a collection of Greek fonts which used to work fine with other versions of Windows (Windows 98). Recently I found the CD on which there were saved and tried to play these Greek fonts on Windows XP SP3, but they were not recognised. I tried them both in Windows English and Greek versions. What could be wrong? Thank you, Paul ...

odbcss.h(430) and WinNT.h(267) 'WCHAR' : redefinition ERROR
I'm getting the following error when I compile: any suggestions would be appreciated.. c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\odbcss.h(430) : error C2371: 'WCHAR' : redefinition; different basic types c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h(267) : see declaration of 'WCHAR' ...

Constant Popping Up of Windows Live Mail
My Windows Live Mail pops up on my screen about every 15 to 30 seconds. Have tried signing out also man other things. Any help would be much appreciated to either stop popups or to delete all together. You could delete it altogether if you don't use it. Which mail client program do you use? --=20 Gary VanderMolen, Microsoft MVP (Mail) Microsoft MVP program: http://mvp.support.microsoft.com "Zancherito" <Zancherito@discussions.microsoft.com> wrote in message = news:995B1E2D-D99D-466F-8593-4C7EA410E4BD@microsoft.com... > My Windows Live Mail pops up on m...

How do I logon on to Windows
I have an MFC application running on a Novell Client WIN2000 machine. If I try to access a file path on a Windows 2000 server using Windows Explorer I get a dialog asking for a UserID and Password. How can I ask the user of this application to provide this information so I can access the file from the application. When I try to access the file from the application now, no dialog is displayed, I just get an error code back from the routine I called. Thanks Tom G. Take a look at the WNetAddConnection(), WNetAddConnection2() or WNetAddConnection3() API's. -- Cheers Check Abdoul [VC++...

VBA from another app: Suppressing Excel confirmation dialog?
After creating/formatting several worksheets from MS Access, I'd like to delete the "Sheetn" worksheets that got put there when I did a .WorkBooks.Add. I avoided using them because I'm not sure how/why they are created - i.e. maybe some user's defaults would only create 1 empty sheet or none. So, form MS Access's VBA I'd like to do: On Error Resume Next .Worksheets("Sheet1").Delete .Worksheets("Sheet2").Delete .Worksheets("Sheet3").Delete .Worksheets("Sheet4").Delete On Erro...