Communicating with the pages in a CPropertySheet
-
(Question 1): How do you obtain the data contained in the various CPropertyPage(s) that the CPropertySheet loaded by the AddPage() function? (Question 2): How do you find out which page the User is presently on? Ex: how do I find out when all the data has been entered?, so I can collect the data entered(once I find out how to get the data from the CPropertyPage(s))
A C++ programming language novice, but striving to learn
-
(Question 1): How do you obtain the data contained in the various CPropertyPage(s) that the CPropertySheet loaded by the AddPage() function? (Question 2): How do you find out which page the User is presently on? Ex: how do I find out when all the data has been entered?, so I can collect the data entered(once I find out how to get the data from the CPropertyPage(s))
A C++ programming language novice, but striving to learn
- CPropertySheet::GetPage(int index) will return a pointer to a CPropertyPage object, which can be cast to a specific CPropertyPage derived class pointer; e.g.,
CMyPage* page = (CMyPage*)MySheet->GetPage(0);
. 2) Likewise, CPropertySheet::GetActivePage()will return a CPropertyPage pointer to the active page. There's also a GetActiveIndex() which returns the integer index of the active page.
- CPropertySheet::GetPage(int index) will return a pointer to a CPropertyPage object, which can be cast to a specific CPropertyPage derived class pointer; e.g.,
-
(Question 1): How do you obtain the data contained in the various CPropertyPage(s) that the CPropertySheet loaded by the AddPage() function? (Question 2): How do you find out which page the User is presently on? Ex: how do I find out when all the data has been entered?, so I can collect the data entered(once I find out how to get the data from the CPropertyPage(s))
A C++ programming language novice, but striving to learn
- treat each property page like a standard dialog: it reads and sets member variables that the owner can then set and read.
-
- treat each property page like a standard dialog: it reads and sets member variables that the owner can then set and read.
In a Standard dialog you have a CWnd object in it's constructor, the "CBCGPPropertySheet" constructor does not. (see constructor below:) "CPropSheet(CBCGPPropertySheet::PropSheetLook look,UINT uiIconsResID = 0, int cxIcon = 0);" If it had an CWnd object I could easily pass that to the propertypage, How could I obtain the CWnd of the "CBCGPPropertySheet" so I can use it for the propertypage could load inline functions in the CBCGPPropertySheet object?(see inlines below:) " //inline functions: void SetDate(CString csDate){ m_csDate = csDate;}"
A C++ programming language novice, but striving to learn
-
In a Standard dialog you have a CWnd object in it's constructor, the "CBCGPPropertySheet" constructor does not. (see constructor below:) "CPropSheet(CBCGPPropertySheet::PropSheetLook look,UINT uiIconsResID = 0, int cxIcon = 0);" If it had an CWnd object I could easily pass that to the propertypage, How could I obtain the CWnd of the "CBCGPPropertySheet" so I can use it for the propertypage could load inline functions in the CBCGPPropertySheet object?(see inlines below:) " //inline functions: void SetDate(CString csDate){ m_csDate = csDate;}"
A C++ programming language novice, but striving to learn
why do you need a CWnd ? if you are creating the property sheets, you have the objects themselves - you don't need a CWnd.
-
(Question 1): How do you obtain the data contained in the various CPropertyPage(s) that the CPropertySheet loaded by the AddPage() function? (Question 2): How do you find out which page the User is presently on? Ex: how do I find out when all the data has been entered?, so I can collect the data entered(once I find out how to get the data from the CPropertyPage(s))
A C++ programming language novice, but striving to learn
Are you wanting the pages to communicate with the sheet, or the pages to communicate with each other?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Are you wanting the pages to communicate with the sheet, or the pages to communicate with each other?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
I may need both. I'm not certain yet which way is best. Could you show me an example of both. I'll try the examples an see which is best in my program.
A C++ programming language novice, but striving to learn
-
I may need both. I'm not certain yet which way is best. Could you show me an example of both. I'll try the examples an see which is best in my program.
A C++ programming language novice, but striving to learn
Store the data in the sheet, and use the
QuerySiblings()
method to forward a message to each page in the sheet. If a page needs to get/put the data, it can get to it viaGetParent()
."Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Store the data in the sheet, and use the
QuerySiblings()
method to forward a message to each page in the sheet. If a page needs to get/put the data, it can get to it viaGetParent()
."Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Thanks.
A C++ programming language novice, but striving to learn