I have a multi-propertysheet/page (a propertysheet inside a
propertypage of another propertysheet) and depending on a XML file I
have I want to communicate between those pages to set/fill controls
and to set back the XML file with updates....
I guess the best way is using DoDataExchange and DDX/DDV.... but how
in this contest?...since I'm really new with MFC I'd like a hint about
how to proceed so I can understand even better DoDataExchange's
behavior...
Thanks to all
Ciao
Luigi
have a nested propertysheet (a main one which has two more
propertysheets in some main's propertypages). I have also a XML file
of general settings that I read in OnInitDialog()'s form event. I'd
like to share this XML file inside all nested propertypages, for
example to fill an edit box with a path file read from the XML file.
I know it's involved DoDataExchange in some way but how I can
implement correctly it to "share" that XML file between all
propertypages (both reading and updating)?
Let's suppose for example to have a main file which has top level
PropertySheet, and in here I load the XML file. Let's suppose to have
in two level under top a propertysheet which has a propertypage that
contains an editbox where I need to initialize with a path file and,
close to that editbox I have a button where I can change path file so
I want to update back the XML file.
Thanks a lot
Ciao
Luigi
You can either assign the controls directly or have variables for them
(I.E., CStrings, ints, etc.) and then call UpdateData() to update the
controls as needed (this is especially true if you are only displaying the
information).
You shoudn't ever have to call DoDataExchage() directly and each
DoDataExchange() should only have control and variable calls for the
property page where it resides.
Tom
"Luigino" <npu...@rocketmail.com> wrote in message
news:ba16c0e3-0a14-4952...@r24g2000yqd.googlegroups.com...
> Since the second property sheet is a child of the first you have the ability
> from the first to call routines in it. I would just set up an
> assign/refresh routine that you can call from the top level propertysheet
> that fills it's own pages as needed and then, the page that has the other
> propertysheet on it can do the same to the subsequent (embedded) sheets.
>
> You can either assign the controls directly or have variables for them
> (I.E., CStrings, ints, etc.) and then call UpdateData() to update the
> controls as needed (this is especially true if you are only displaying the
> information).
>
> You shoudn't ever have to call DoDataExchage() directly and each
> DoDataExchange() should only have control and variable calls for the
> property page where it resides.
>
I could have to disable/enable controls and manage validations, so I
thought to maintain XML in the main Dialog which contains the top-
level PropertySheet and pass/get values from child sheets so I could
also validate if I have to disable some controls depending of a
certain value or not, plus for example if I activate a check-box in a
child page I should disable another control in another page...
so any idea?...
Thanks
Ciao
Luigi
Tom
"Luigino" <npu...@rocketmail.com> wrote in message
news:95cf07fa-ca51-4a3c...@r24g2000yqd.googlegroups.com...