📄 usertypedlg.cpp
字号:
// UserTypeDlg.cpp : implementation file
//
#include "stdafx.h"
#include "GpsSC.h"
#include "UserTypeDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CUserTypeDlg dialog
CUserTypeDlg::CUserTypeDlg(CWnd* pParent /*=NULL*/)
: CDialog(CUserTypeDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CUserTypeDlg)
m_nType = -1;
m_nNormalUser = -1;
//}}AFX_DATA_INIT
m_nUserType = 0;
}
CUserTypeDlg::CUserTypeDlg(int nUserType,CWnd* pParent)
:CDialog(CUserTypeDlg::IDD, pParent)
{
m_nUserType = nUserType;
}
void CUserTypeDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CUserTypeDlg)
DDX_Control(pDX, IDC_NORMALUSER, m_ctlNormalUser);
DDX_Control(pDX, IDC_CENTER, m_ctlCenter);
DDX_Radio(pDX, IDC_CENTER, m_nType);
DDX_Radio(pDX, IDC_NORMALUSER, m_nNormalUser);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CUserTypeDlg, CDialog)
//{{AFX_MSG_MAP(CUserTypeDlg)
ON_BN_CLICKED(IDC_CENTER, OnCenter)
ON_BN_CLICKED(IDC_NORMALUSER, OnNormaluser)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CUserTypeDlg message handlers
BOOL CUserTypeDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
if(m_nUserType == 0) {
m_ctlCenter.SetCheck(1);
}
else if(m_nUserType == 1) {
m_ctlNormalUser.SetCheck(1);
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CUserTypeDlg::OnCenter()
{
// TODO: Add your control notification handler code here
m_nUserType = 0;
m_ctlNormalUser.SetCheck(0);
m_ctlCenter.SetCheck(1);
}
void CUserTypeDlg::OnNormaluser()
{
// TODO: Add your control notification handler code here
m_nUserType = 1;
m_ctlCenter.SetCheck(0);
m_ctlNormalUser.SetCheck(1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -