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

how to have two property pages communicate w/ each other?

0 views
Skip to first unread message

Dave Horton

unread,
Jul 22, 1999, 3:00:00 AM7/22/99
to
I have a COM object which supports ISPecifyPropertyPages, and hosts several
property pages. If the user changes a specific item on one of the pages,
then I need to update some of the controls on another page. Currently, I'm
only updating the controls on this second page when I get the OnInitDialog
message, which I don't get when the user reactivates the page after
previously visiting it. What is the preferred way (or suggested way) to
handle this?

Gabriel Kniznik

unread,
Jul 22, 1999, 3:00:00 AM7/22/99
to
What about OnSetActive? You should catch WM_NOTIFY with code =
PSN_SETACTIVE.

Gabriel Kniznik


Dave Horton <daveh...@mindspring.com> wrote in message
news:uyIPzmJ1#GA.222@cppssbbsa03...

Dave Horton

unread,
Jul 23, 1999, 3:00:00 AM7/23/99
to
That doesn't seem to work, in that my property page is not being sent that
notification as far as I can tell (I added a NOTIFY_CODE_HANDLER to my
message map for PSN_SETACTIVE but the handler is not called). My property
page is inherited from IPropertyPageImpl<>, by the way if that helps.


Gabriel Kniznik wrote in message <#cOmFiK1#GA.252@cppssbbsa05>...

Gabriel Kniznik

unread,
Jul 23, 1999, 3:00:00 AM7/23/99
to

IPropertyPageImpl doesn't seem to be inheriting from a property page class
(and hence no WM_NOTIFY), but your property page does inherit from
CDialogImpl, which represents a generic Windows dialog. You can catch
WM_SHOWWINDOW to do your initialization (I tried it and it seems to work)

Gabriel Kniznik


Dave Horton <daveh...@mindspring.com> wrote in message

news:OQ0SAvQ1#GA.310@cppssbbsa04...

Dave Horton

unread,
Jul 23, 1999, 3:00:00 AM7/23/99
to
Well, I tried that, without much success. WM_SHOWWINDOW does get called
when the page is first displayed, but if I navigate to a different page in
the dialog and then back to original one, there is no WM_SHOWWINDOW message.
Then, when I dismiss the dialog WM_SHOWWINDOW is sent one last time. I need
an event or message each time I navigate to the page, because the underlying
data might have been changed since the last time the page was displayed.


Gabriel Kniznik wrote in message ...

Alexander Nickolov

unread,
Jul 23, 1999, 3:00:00 AM7/23/99
to
The documented way to determine when the PP becomes visible is
IPropertyPage::Show. I haven't done PPs myself though...

--
===============================
Alexander Nickolov, MCP
Panasonic Technologies Inc.
Speech Technology Laboratory
email: agnic...@geocities.com
===============================

Dave Horton wrote in message ...

Dave Horton

unread,
Jul 26, 1999, 3:00:00 AM7/26/99
to
Tried that; but seemed to have the same problem. That is, it was called
when the page was first displayed, but then as I change focus to a different
page in the dialog and then back it isn't called.

Alexander Nickolov wrote in message ...

Gabriel Kniznik

unread,
Jul 26, 1999, 3:00:00 AM7/26/99
to
Maybe you should define a custom message and send it whenever a change is
made (from the changing page to others). In the page that should reflect the
changes, you can catch this message. The standard implementation of property
pages does that through WM_QUERYSIBLINGS.

Gabriel Kniznik

Dave Horton <daveh...@mindspring.com> wrote in message

news:uFlC0G21#GA.265@cppssbbsa03...

Girish Bharadwaj[mvp]

unread,
Jul 26, 1999, 3:00:00 AM7/26/99
to

You can always write your own implementation of IPropertyPageSite and
do what you need to do to setup communication between pages. And use
that in the call from the container to show property pages.

Girish Bharadwaj [mvp].
Please do not email queries to me.
Post them in newsgroups.
Thank you.


0 new messages