You should be able to just add #ifdef's to the .rc file in your project
(they are just text files) to comment stuff out for some builds, though I
have never tried this myself.
The resource compiler uses a different set of defines to your c++ compiler.
You can set which constants to set when the resource compiler is run in the
Resources tab of the project settings dialog.
Not sure why you would want to bother though. It will only save you a few
bytes and it probably won't effect the size of the exe at all, as padding
will probably result in it staying the same size.
Rik Heywood
----- Original Message -----
From: "Brian Hook" <bri...@py...>
To: <gam...@li...>
Sent: Sunday, November 18, 2001 3:23 AM
Subject: [GD-Windows] Resource conditions in Visual Studio
> I have some dialog boxes that are only required in the demo build of one
> of our games (registration). According to the (thin) docs, I can set a
> "Condition" for resources to be included in the final EXE. Simple
> enough. Their example lists "NDEBUG" as a sample.
>
> Okay, so I give it a shot. No go, it's not included. I have a compiler
> constant TEST_BUILD defined in the project settings. Then I set the
> "Condition" property for a dialog to "TEST_BUILD". It no likey, doesn't
> include it. You can't put in comparisons either, e.g. "TEST_BUILD==1"
> is a syntax error.
>
> Any ideas what kind of mystical kung fu is required to make this work?
>
> Brian
>
>
> _______________________________________________
> Gamedevlists-windows mailing list
> Gam...@li...
> https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
>
|