📄 createchannelpage0.cpp
字号:
// CreateChannelPage0.cpp : implementation file
//
#include "stdafx.h"
#include "BeeReader.h"
#include "CreateChannelPage0.h"
#include "CreateChannelSheet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCreateChannelPage0 property page
IMPLEMENT_DYNCREATE(CCreateChannelPage0, CPropertyPage)
CCreateChannelPage0::CCreateChannelPage0() : CPropertyPage(CCreateChannelPage0::IDD)
{
//{{AFX_DATA_INIT(CCreateChannelPage0)
m_iModel = 0;
//}}AFX_DATA_INIT
}
CCreateChannelPage0::~CCreateChannelPage0()
{
}
void CCreateChannelPage0::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCreateChannelPage0)
DDX_Radio(pDX, IDC_RADIO1, m_iModel);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CCreateChannelPage0, CPropertyPage)
//{{AFX_MSG_MAP(CCreateChannelPage0)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCreateChannelPage0 message handlers
BOOL CCreateChannelPage0::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
BOOL CCreateChannelPage0::OnSetActive()
{
// TODO: Add your specialized code here and/or call the base class
CCreateChannelSheet* pSheet = (CCreateChannelSheet*)GetParent();
pSheet->SetWizardButtons( PSWIZB_NEXT );
return CPropertyPage::OnSetActive();
}
LRESULT CCreateChannelPage0::OnWizardNext()
{
// TODO: Add your specialized code here and/or call the base class
UpdateData( TRUE );
CCreateChannelSheet* pSheet = (CCreateChannelSheet*)GetParent();
switch( m_iModel )
{
case 0:
{
if( pSheet->iModel != 0 )
{
if( pSheet->iModel > 0 )
{
if( pSheet->iModel == 2 )
{
pSheet->RemovePage( &pSheet->page4 );
pSheet->RemovePage( &pSheet->page5 );
pSheet->RemovePage( &pSheet->page2 );
}
else if( pSheet->iModel == 1 )
{
pSheet->RemovePage( &pSheet->page5 );
}
}
pSheet->AddPage(&pSheet->page1 );
pSheet->AddPage(&pSheet->page2 );
pSheet->AddPage(&pSheet->page3 );
pSheet->iModel = 0;
}
break;
}
case 1:
{
if( pSheet->iModel != 1 )
{
if( pSheet->iModel == 0 )
{
pSheet->RemovePage( &pSheet->page1);
pSheet->RemovePage( &pSheet->page2 );
pSheet->RemovePage( &pSheet->page3 );
}
else if( pSheet->iModel == 2 )
{
pSheet->RemovePage( &pSheet->page4 );
pSheet->RemovePage( &pSheet->page2 );
}
pSheet->AddPage( &pSheet->page2 );
pSheet->AddPage( &pSheet->page5 );
pSheet->iModel = 1;
}
break;
}
case 2:
{
if( pSheet->iModel != 2 )
{
if( pSheet->iModel == 0 )
{
pSheet->RemovePage( &pSheet->page1);
pSheet->RemovePage( &pSheet->page2 );
pSheet->RemovePage( &pSheet->page3 );
}
else if( pSheet->iModel == 1 )
{
pSheet->RemovePage( &pSheet->page5 );
pSheet->RemovePage( &pSheet->page2 );
}
pSheet->AddPage( &pSheet->page4 );
pSheet->AddPage( &pSheet->page2 );
pSheet->AddPage( &pSheet->page5 );
pSheet->iModel = 2;
}
break;
}
}
return CPropertyPage::OnWizardNext();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -