Reusing dialog procedure and resource file code
I've been working on a program that uses a resource file to
produce a dialog box that has 17 edit boxes for user input
regarding members of a class and several buttons to control
doing things with the information like save, cancel, exit.
I want to use the same information with several different views.
In one view I want to be able to add the object created to a
vector. In another view I want to be ablet to view the
information regarding a given element of the vector in read
only format, so user can't change the information, just view it.
In a third view I wantto be able to edit the information of a
given element of thevector, but not add it anew to the vector.
I can do all that by using the resource editor to create three
distinct dialog boxes, one for each view. However, since the
17 edit boxes and 17 static labels will all be the same I was
hoping there was a way to change what gets done when a button
is pushed or to change the baseline behaviour of the edit boxes
without recreating the entire dialog box for each view.
I know I can enable/disable and show/noshow buttons on the fly,
but can I change what gets done when I push the button from one
view to the other using the same dialog procedure function? Can
I change baseline behavior of edit boxes between read only and
editable on the fly? Can I make the entire dialog box read only
or do I have to change the property of each edit box individually?
I'm using VC6++ and Windows API.
Thanks in advance.