Home > Article > Web Front-end > CPropertySheet tab page realizes switching between various CPropertyPage pages_html/css_WEB-ITnose
Source: http://bbs.csdn.net/topics/390973895
There are three methods:
The first one
It is your CPropertyPage that passes the original CPropertySheet class object pointer as the parent window when creating
CPropertyPage::Create(UINT nIDTemplate, CWnd* pParentWnd = NULL)Then command in the menu
CPropertySheet *pParent = (CPropertySheet *)GetParent();
pParent->SetActivePage(iPage);Second type
is to save the CPropertySheet object pointer in your CPropertyPage class. It is passed in when the CPropertyPage object is constructed, and then SetActivePage is directly passed through this pointer in the menu command message processing
The third method
is to save the window handle of the CPropertySheet object in your CPropertyPage class. Pass it in when the CPropertyPage object is constructed, and then use this handle to send the self-portrait to CPropertySheet in the menu command message processing. Define the message. When CPropertySheet receives this message, SetActivePage