Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect "Use MFC" in preprocessor

For a static Win32 library, how can I detect that any of the "Use MFC" options is set?

i.e.

#ifdef ---BuildingForMFC---
....
#else
...
#endif
like image 482
peterchen Avatar asked Jul 28 '09 21:07

peterchen


1 Answers

I have always checked for the symbol _MFC_VER being defined.

This is the version number of MFC being used 0x0700 = 7.0

It is in the "Predefined Macros" in MSDN

like image 122
Bruce Ikin Avatar answered Oct 18 '22 15:10

Bruce Ikin