Re: Check a radio button



If an interface changes, you recompile. You are talking about a standard problem in
building systems, which is that you have to keep the compiled code consistent with the
interfaces.

This assumes that you expose the class at all. If you are working in something modular as
you describe, you would not want to expose ANY part of the CWnd-derived class to ANY
component. You would not use member variables, you would not use virtual methods, you
would in fact use COM, because that is what it is designed to support. It is the purest
form of abstraction, because the representation is totally hidden.

Key here is that you are thinking that you can enhance interfaces without rebuilding the
system. This is the "everything must improve and nothing can change" mentality that is
fatal to the long-term viability of a project. Been there, done that, and one thing I
learned is that a company that makes these kinds of demands is a dead company, it just
hasn't figured it out yet. I've watched several projects die from this form of
self-destructive attitude, although I only worked on one of them.

This is why Microsoft rebuilds Windows from scratch nightly. It avoids the destructive
mindset that requires that nothing change.

One software methodology I put into place at one company I worked for ws that each product
must be buildable from a batch job, from scratch, at any time. When the company was
finally bought out almost 20 years later, they were still working that way. It was the
only way that made sense, and I am a strong believer that any company that CANNOT build
the entire project from scratch at any instant does not have a product, they have an
experiment that is going to blow up in their faces with possibly fatal consequences.

I once worked on a project that had that problem: because the source code adapted to
compiler bugs, we could not recompile more than one module at a time because some number
of bugs would simply be due to compiler changes. 500K+ lines of source, and maintaining
it was a complete and total disaster. It ultimately became frozen because nobody dared do
any maintenance.
joe

On Thu, 31 May 2007 13:22:58 -0700, "Ashot Geodakov" <a_geodakov@xxxxxxxxxxxxxxxxxx>
wrote:

"AliR (VC++ MVP)" <AliR@xxxxxxxxxxxxx> wrote in message
news:7oF7i.23724$YL5.8068@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I don't think that adding a variable would have any consequences to a
calling program.

At least in the Release build, if I go to the Disassembler window, I see
that the program refers to member variables by their offsets from some
"base" address.

If you have some out-of-date class definition, your result executable will
for sure try to address some wrong location in memory...

PS: This is not to undermine your point; I would always create member
variables for dialog controls. But, again, there are circumstances...

Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.