Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Multilevel PropertySheet/PropertyPages and communication between them

1 view
Skip to first unread message

Luigino

unread,
Nov 20, 2009, 4:23:57 AM11/20/09
to
Hello everyone!

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

Luigino

unread,
Nov 20, 2009, 9:20:02 AM11/20/09
to
Explaining better my problem....

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

Tom Serface

unread,
Nov 20, 2009, 10:17:27 AM11/20/09
to

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.

Tom

"Luigino" <npu...@rocketmail.com> wrote in message
news:ba16c0e3-0a14-4952...@r24g2000yqd.googlegroups.com...

Luigino

unread,
Nov 20, 2009, 11:09:55 AM11/20/09
to
HI Tom,


> 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 Serface

unread,
Nov 20, 2009, 12:57:18 PM11/20/09
to
If you're going to do a lot of that kind of stuff and you need real time
notification in the parent you could easily set up some user messages and
just send a message to the parent window for special things you want it to
check or store or vice versa since the child knows the parent (GetParent())
and the parent knows the child since it embedded it.

Tom

"Luigino" <npu...@rocketmail.com> wrote in message

news:95cf07fa-ca51-4a3c...@r24g2000yqd.googlegroups.com...

0 new messages