Re: How to determine if compiling a Win32 versus MFC project?
- From: "Ajay Kalra" <ajaykalra@xxxxxxxxx>
- Date: Thu, 9 Mar 2006 14:24:26 -0500
I think you are missing something.
CommonHeader.h
#ifdef _MFC_VER
#define MFC_IS_ENABLED
....
#endif
project 1 stdafx.h
#include commonheader.h
etc.
You can now use it as:
#ifdef MFC_IS_ENABLED
whatever
#endif
--
Ajay Kalra [MVP - VC++]
ajaykalra@xxxxxxxxx
"Danny Pressley" <DannyPressley@xxxxxxxxxxxxxxxx> wrote in message
news:8A8EA6DA-3950-46E9-A784-01FABD8F96E2@xxxxxxxxxxxxxxxx
Hi Ajay,which
Are you referring to what stdafx.h accomplishes for MFC projects, a common
header file for all source files to include? Ok, say I create a new common
header file for all my projects (Win32 and MFC) source files to use named
CommonHeader.h. Inside that header file, I will still need some sort of
predefined preprocessor directive to tell the CommonHeader.h to include
set of header files. That is why the second section of my last reply Ia
mentioned just adding a MFC_ENABLED preprocessor define in all my MFC
projects project settings. Below is what I believe you are referring to as
common header file.
========================================
========================================
#ifdef ??? //what would this be
#include "stdafx.h"
...
#else
#include "windows.h"
...
#endif
========================================
========================================
Thanks,
Danny
.
- Follow-Ups:
- Re: How to determine if compiling a Win32 versus MFC project?
- From: Tom Serface
- Re: How to determine if compiling a Win32 versus MFC project?
- References:
- Re: How to determine if compiling a Win32 versus MFC project?
- From: Ajay Kalra
- Re: How to determine if compiling a Win32 versus MFC project?
- From: "TerryFei"
- Re: How to determine if compiling a Win32 versus MFC project?
- From: Ajay Kalra
- Re: How to determine if compiling a Win32 versus MFC project?
- Prev by Date: Re: How to Duplicate CString's Default Data Type
- Next by Date: Enumerating all elements within a CHtmlView
- Previous by thread: Re: How to determine if compiling a Win32 versus MFC project?
- Next by thread: Re: How to determine if compiling a Win32 versus MFC project?
- Index(es):
Relevant Pages
|