Re: How to determine if compiling a Win32 versus MFC project?
- From: "Tom Serface" <tserface@xxxxxxx>
- Date: Thu, 9 Mar 2006 11:31:43 -0800
Hi Ajay,
It's still something he'd have to add to every project that uses his code so
it's just really inconvenient.
Tom
"Ajay Kalra" <ajaykalra@xxxxxxxxx> wrote in message
news:%236K5e76QGHA.2300@xxxxxxxxxxxxxxxxxxxxxxx
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: Ajay Kalra
- 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?
- From: Ajay Kalra
- Re: How to determine if compiling a Win32 versus MFC project?
- Prev by Date: Re: How to determine if compiling a Win32 versus MFC project?
- Next by Date: Re: How to avoid maximizing dialog while double click'ing on titlebar..
- 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
|