mypropertypage1.cpp

来自「usb的skype电话」· C++ 代码 · 共 120 行

CPP
120
字号
// MyPropertyPage1.cpp : implementation file
//

#include "stdafx.h"
#include "resource.h"
#include "MyPropertyPage1.h"
#include "Volume.h"
#include "PhoneUI.h"


#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

IMPLEMENT_DYNCREATE(CMyPropertyPage1, CPropertyPage)
IMPLEMENT_DYNCREATE(CMyPropertyPage2, CPropertyPage)


/////////////////////////////////////////////////////////////////////////////
// CMyPropertyPage1 property page

CMyPropertyPage1::CMyPropertyPage1() : CPropertyPage(CMyPropertyPage1::IDD)
{
	//{{AFX_DATA_INIT(CMyPropertyPage1)
	m_Run = FALSE;
	//}}AFX_DATA_INIT
}

CMyPropertyPage1::~CMyPropertyPage1()
{
}

void CMyPropertyPage1::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMyPropertyPage1)
	DDX_Control(pDX, IDC_SLIDER_RING, m_VolumeRing);
	DDX_Control(pDX, IDC_SLIDER_MIC, m_VolumeMic);
	DDX_Control(pDX, IDC_SLIDER_INCALL, m_VolumeIncall);
	DDX_Check(pDX, IDC_AUTORUN, m_Run);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMyPropertyPage1, CPropertyPage)
	//{{AFX_MSG_MAP(CMyPropertyPage1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CMyPropertyPage2 property page

CMyPropertyPage2::CMyPropertyPage2() : CPropertyPage(CMyPropertyPage2::IDD)
{
	//{{AFX_DATA_INIT(CMyPropertyPage2)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}

CMyPropertyPage2::~CMyPropertyPage2()
{
}

void CMyPropertyPage2::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMyPropertyPage2)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMyPropertyPage2, CPropertyPage)
	//{{AFX_MSG_MAP(CMyPropertyPage2)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()



BOOL CMyPropertyPage1::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();
	
	m_VolumeRing.SetRange(m_Volume_Min, m_Volume_Max);
	m_VolumeIncall.SetRange(m_Volume_Min, m_Volume_Max);
	m_VolumeMic.SetRange(m_Volume_Min, m_Volume_Max);

	m_VolumeRing.SetPos(m_Volume_Ring);
	m_VolumeIncall.SetPos(m_Volume_InCall);
	m_VolumeMic.SetPos(m_Mic_Cur);	

	m_Run=m_AutoRun;
		
	UpdateData(FALSE);
	return TRUE;  // return TRUE unless you set the focus to a control
}

BOOL CMyPropertyPage1::OnApply()
{
	UpdateData(TRUE);
	
	m_Volume_Ring=m_VolumeRing.GetPos();
	m_Volume_InCall=m_VolumeIncall.GetPos();
	m_Mic_Cur=m_VolumeMic.GetPos();
	m_AutoRun=m_Run;
	SetRegKeys();

	return (CPropertyPage::OnApply());
}	


void CMyPropertyPage1::OnOK()
{
	CPropertyPage::OnOK();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?