alteradpass.cpp

来自「计算机管理系统可以实现开机时自动运行」· C++ 代码 · 共 69 行

CPP
69
字号
// alteradpass.cpp : implementation file
//

#include "stdafx.h"
#include "System.h"
#include "alteradpass.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// alteradpass dialog


alteradpass::alteradpass(CWnd* pParent /*=NULL*/)
	: CDialog(alteradpass::IDD, pParent)
{
	//{{AFX_DATA_INIT(alteradpass)
	m_oldpassword = _T("");
	m_newpassword = _T("");
	m_newpass = _T("");
	//}}AFX_DATA_INIT
}


void alteradpass::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(alteradpass)
	DDX_Text(pDX, IDC_OLDPASS, m_oldpassword);
	DDX_Text(pDX, IDC_NEWPASSWORD, m_newpassword);
	DDX_Text(pDX, IDC_NEWDPASS, m_newpass);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(alteradpass, CDialog)
	//{{AFX_MSG_MAP(alteradpass)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// alteradpass message handlers

void alteradpass::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
		CBitmap bmp;
	bmp.LoadBitmap(IDB_BITMAP2);// Get the size of the bitmap
	BITMAP bmpInfo;
	bmp.GetBitmap(&bmpInfo);
	// Create an in-memory DC compatible with the
	// display DC we're using to paint
	CDC dcMemory;
	dcMemory.CreateCompatibleDC(&dc);
	// Select the bitmap into the in-memory DC
	CBitmap *pOldBmp=dcMemory.SelectObject(&bmp);
	// Copy the bits from the in-memory DC into the on-	// screen DC to actually do the painting
     dc.BitBlt(0, 0, bmpInfo.bmWidth, bmpInfo.bmHeight, &dcMemory, 0, 0, SRCCOPY);
	// TODO: Add your message handler code here
	
	// Do not call CDialog::OnPaint() for painting messages
}

⌨️ 快捷键说明

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