If you select a resource in Resource View (e.g. a dialog) and go to Properties (press <F4>), you will see an input field called “Condition”, where you can type the preprocessor symbol that determines the inclusion of the resource.
Maybe this technique can be used in your case. Use these symbols: _DEBUG and NDEBUG. What type of resource do you have?