Re: Is it possible to view/open PropertySheet with PropertyPages in
VS IDE ???
here are my codes that i assume will add the additional dialog box:
class CTigerXConfigPage2 : public CIntHelpPropertyPage
{
DECLARE_DYNCREATE(CTigerXConfigPage2)
private:
CTigerXDrvCfg* m_pcDrvCfg;
int m_iTestBox;
public:
CTigerXConfigPage2(CTigerXDrvCfg *pCfg = NULL);
~CTigerXConfigPage2();
public:
virtual void OnOK();
protected:
virtual BOOL OnInitDialog();
virtual void DoDataExchange(CDataExchange* pDX);
};
IMPLEMENT_DYNCREATE(CTigerXConfigPage2, CIntHelpPropertyPage)
CTigerXConfigPage2::CTigerXConfigPage2(CTigerXDrvCfg *pCfg)
: CIntHelpPropertyPage(_T("IDD_TEST"),0,0,DRV_LANG_ENGLISH)
{
m_pcDrvCfg = pCfg;
if (m_pcDrvCfg)
{
m_iTestBox = m_pcDrvCfg->GetTestBox();
}
}
CTigerXConfigPage2::~CTigerXConfigPage2(){}
void CTigerXConfigPage2::DoDataExchange(CDataExchange *pDX)
{
CIntHelpPropertyPage::DoDataExchange(pDX);
DDX_Radio(pDX, IDC_RADIO1, m_iTestBox);
}
BOOL CTigerXConfigPage2::OnInitDialog()
{
CIntHelpPropertyPage::OnInitDialog();
return TRUE;
}
void CTigerXConfigPage2::OnOK()
{
if (m_pcDrvCfg)
{
m_pcDrvCfg->SetTestBox(m_iTestBox);
}
CIntHelpPropertyPage::OnOK();
}
//in some other proprietary function....
CTigerXConfigPage cTigerXDlg(pCfg);
CTigerXConfigPage2 cTigerXDlg2(pCfg);
CObList cPageList;
cPageList.AddTail(&cTigerXDlg);
cPageList.AddTail(&cTigerXDlg2); //if i comment this out... the
CPropertySheet shows as normal