BaluS
BaluS

Reputation: 55

Exchanging data between property page of CPropertySheet

I have a property sheet having two pages. The first page contains an edit box (EDITBOX1)and a check box (CHECKBOX1) . The second page contains also contains an edit box(EDITBOX2) with a check box(CHECKBOX2). I am trying to implement a way that when there is no value in EDITBOX1 and EDITBOX2 have some value CHECKBOX2 should be checked and it should be dithered .

Then when we entered somevalue to EDITBOX1 the previously checked CHECKBOX2 should not be checked and dithered.

Can anyone suggest me some implementation? Any suggestion is appreciated. Thanks a lot!

Upvotes: 0

Views: 240

Answers (2)

dronne
dronne

Reputation: 21

Include your pages in your MyPropertySheet.h file. Declare your pages (CPropertyPage m_Page1, CPropertyPage m_Page2, ..) - as many as you need - in the MyPropertySheet.h file.

Add the pages to your CPropertySheet in the class constructor in MyPropertySheet.cpp file with method

CPropertySheet::AddPage(&m_Page);

Get parent of your CPropertySheet in MyPropertyPage2.cpp such as:

CMyPropertySheet* pSheet = (CMyPropertySheet*)GetParent();

Reach your m_Page1 controls pSheet->m_Page1.GetDlgItem(CHECKBOX2) from m_Page2.

Upvotes: 0

Joseph Willcoxson
Joseph Willcoxson

Reputation: 6050

Derive your own class from CPropertySheet. Override CPropertySheet::OnActivatePage. Set the appropriate page how you want when it is activated.

Upvotes: 1

Related Questions