Re: VS2005 - Protect Conditional Defines in .RC File?
Couldn't you just hide the second control at runtime? That seems easier to
me. If that is not the case you will likely have to use the RC2 file as
David suggested since there is no guarantee that the IDE will not rewrite
the .RC file leaving your manual changes out.
I would just have all of the controls, in this case radio buttons, that are
possible and hide the unneeded ones at runtime. You can even reposition
them at run time if needed.
Tom
"David F." <df2705@community.nospam> wrote in message
news:uvpttjRiIHA.1204@TK2MSFTNGP03.phx.gbl...
The rc2 file?
I guess I should have said "conditional compile" statements.
#ifdef BUILD_RC_WITH_ONLY_THIS
CONTROL "&THIS",IDC_RADIOTHIS,"Button",BS_AUTORADIOBUTTON |
BS_NOTIFY,17,58,162,10
#else
CONTROL "&THIS",IDC_RADIOTHIS,"Button",BS_AUTORADIOBUTTON |
BS_NOTIFY,17,58,162,10
CONTROL "&THAT",IDC_RADIOTHAT,"Button",BS_AUTORADIOBUTTON |
BS_NOTIFY,17,78,162,10
#endif
"David Wilkinson" <no-reply@effisols.com> wrote in message
news:OzCPbeKiIHA.4684@TK2MSFTNGP06.phx.gbl...
David F. wrote:
Hi,
How do I prevent VS Resource Editor from overwriting the .RC file and
causing my conditional defines in it to be lost?
David:
One way is to put them in the .rc2 file.
--
David Wilkinson
Visual C++ MVP