Update Samples to not require MFC
The Samples included with the SDK cannot currently be compiled on Windows unless MFC was installed as part of the Visual Studio installation procedure.
Making the Samples requires two small things:
- Add the following include below the SDKDef.h include in VersionInfo.rc
include "verrsrc.h"
- Change the "afxres.h" include in the .rc of all plugins to instead include "winuser.h"
Doing so will make MFC optional, and not required; ultimately, including 'afxres.h' is including the two headers outlined above so it's just introducing an unnecessary middle man who can be safely bypassed.
-
Andrew Patterson commented
I should mention that you also need to update the TEXTINCLUDE section at the bottom from:
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
ENDto
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""winuser.h""\r\n"
"\0"
ENDYou might be able to get away with a simple search & replace of 'afxres.h' -> 'winuser.h' in *.rc