Click to See Complete Forum and Search --> : How do I get a pointer to a CPropertyPage's CPropertySheet?


May 13th, 1999, 12:47 PM
Hi,
I have a CPropertySheet with two property pages.
I need to read the text in an edit control in one page from the other page.
If I could get a pointer to the property sheet from the page, I know what to do.
But how do I get that pointer?

Thanks
D.B.

Rich Bietz
May 13th, 1999, 01:10 PM
Use GetParent( ) and cast to CPropertySheet.

May 13th, 1999, 01:13 PM
Hi!

U can use the function CWnd::GetParent() to get a pointer to the parent of the property pages and that will be the the property sheet. U can do this in the OnInitDialog() handler of either of the property pages. For this , however u will have to subclass the property page so as to be able to handle the WM_INITDIALOG message.

HTH