📄 page6.cpp
字号:
// Page6.cpp : implementation file
//
#include "stdafx.h"
#include "HiCut.h"
#include "Page6.h"
#include "UserAdd.h"
#include "UserChapas.h"
#include "UserDel.h"
#include "LoginDialog.h"
//extern CString m_login_user;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPage6 property page
IMPLEMENT_DYNCREATE(CPage6, CPropertyPage)
CPage6::CPage6() : CPropertyPage(CPage6::IDD)
{
//{{AFX_DATA_INIT(CPage6)
//}}AFX_DATA_INIT
}
CPage6::~CPage6()
{
}
void CPage6::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPage6)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPage6, CPropertyPage)
//{{AFX_MSG_MAP(CPage6)
ON_BN_CLICKED(IDC_CHANGEPASSWORD, OnChangepassword)
ON_BN_CLICKED(IDC_ADDUSER, OnAdduser)
ON_BN_CLICKED(IDC_DELETEUSER, OnDeleteuser)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPage6 message handlers
void CPage6::OnChangepassword()
{
CUserChapas dlg;
dlg.DoModal();
}
void CPage6::OnAdduser()
{
CUserAdd dlg;
dlg.DoModal();
}
void CPage6::OnDeleteuser()
{
CUserDel dlg;
dlg.DoModal();
}
BOOL CPage6::OnSetActive()
{
// TODO: Add your specialized code here and/or call the base class
return CPropertyPage::OnSetActive();
}
BOOL CPage6::OnInitDialog()
{
CPropertyPage::OnInitDialog();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
/////////////////
void CPage6::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
dc.SetBkMode(TRANSPARENT);
SetLogoFont("Arial");
CFont * OldFont = dc.SelectObject(&m_fontLogo);
CRect rect(100,100,300,50);
extern CString m_login_user,m_user_right,m_user_truename,m_user_job;
dc.SetTextColor( ::GetSysColor( COLOR_3DSHADOW));
dc.DrawText( m_login_user, rect+ CPoint(50,20), DT_SINGLELINE | DT_LEFT | DT_VCENTER);
dc.DrawText( m_user_truename, rect+ CPoint(50,60), DT_SINGLELINE | DT_LEFT | DT_VCENTER);
dc.DrawText( m_user_right, rect+ CPoint(50,140), DT_SINGLELINE | DT_LEFT | DT_VCENTER);
dc.DrawText( m_user_job, rect+ CPoint(50,100), DT_SINGLELINE | DT_LEFT | DT_VCENTER);
// Do not call CPropertyPage::OnPaint() for painting messages
}
void CPage6::SetLogoFont(CString Name, int nHeight/* = 24*/,
int nWeight/* = FW_BOLD*/, BYTE bItalic/* = true*/, BYTE bUnderline/* = false*/)
{
if(m_fontLogo.m_hObject)
m_fontLogo.Detach();
m_fontLogo.CreateFont(nHeight, 0, 0, 0, nWeight, bItalic, bUnderline,0,0,0,0,0,0, Name);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -