For a Win32 C++ project define the macro in the resource.h file.
For example --
From the .rc file
#ifdef TWODIALOGS
IDD_DIALOG1 DIALOGEX 0, 0, 309, 176
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,198,155,50,14
PUSHBUTTON "Cancel",IDCANCEL,252,155,50,14
END
#endif
resource.h file
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by WindowsProject3.rc
//
#define IDC_MYICON 2
#define IDD_WINDOWSPROJECT3_DIALOG 102
#define IDS_APP_TITLE 103
#define IDD_ABOUTBOX 103
#define IDM_ABOUT 104
#define IDM_EXIT 105
#define IDI_WINDOWSPROJECT3 107
#define IDI_SMALL 108
#define IDC_WINDOWSPROJECT3 109
#define IDR_MAINFRAME 128
#define IDD_DIALOG1 129
#define IDC_STATIC -1
#define TWODIALOGS
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 130
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 110
#endif
#endif
With macro defined -
With macro commented out