Choosing the proper target Windows version can be very important. It is here, if you don't explicitly set it yourself then the Visual Studio assumes you'll target the latest and greatest. Which is Windows 8 for VS2012.
Which includes a new option for LoadLibraryEx(), the LOAD_LIBRARY_SEARCH_SYSTEM32 option. Available on Windows 8 but requires a security patch to be installed if you use it on Windows Vista, 7 or 2008. It is a pretty critical one, clearly you don't have it installed.
If you want your program to be compatible with old or unpatched Windows versions then you need to change the target. This is typically done by the targetver.h
header file, assuming your MFC project was generated by a relatively recent wizard. Modify it like this:
#pragma once
// Including SDKDDKVer.h defines the highest available Windows platform.
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
#define _WIN32_WINNT _WIN32_WINNT_WINXP // NOTE: added
#include <SDKDDKVer.h>
If you don't have targetver.h then put it anywhere before the #include for <windows.h>
. Tweak the value as desired. Note that XP isn't currently supported by VS2012 but will be later.