⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.cpp

📁 wince 的PPC程序,关于银行方便的,但是是测试的程序,不是上线的,不过里面有很多算法还是值得一看的
💻 CPP
字号:
// Login.cpp : implementation file
//
#include "stdafx.h"
#include "resource.h"
#include "Login.h"
#include "Operator.h"

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

/////////////////////////////////////////////////////////////////////////////
// CLogin dialog


CLogin::CLogin(CWnd* pParent /*=NULL*/)
	: CDialog(CLogin::IDD, pParent)
{
	//{{AFX_DATA_INIT(CLogin)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CLogin::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CLogin)
	DDX_Control(pDX, IDC_PASSWD, m_strPasswd);
	DDX_Control(pDX, IDC_ACCOUNT, m_strAccount);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CLogin, CDialog)
	//{{AFX_MSG_MAP(CLogin)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CLogin message handlers

BOOL CLogin::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	AfxGetMainWnd()->SetWindowText(_T("        输入帐号/密码"));	
	::SetForegroundWindow(AfxGetMainWnd()->m_hWnd);
	SHFullScreen(AfxGetMainWnd()->m_hWnd, SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON |   SHFS_HIDESTARTICON);
	// 使用如下语句把对话框右上角的 OK 按钮去掉.
	ModifyStyle(this->m_hWnd, WS_CAPTION, WS_MINIMIZEBOX, SWP_NOSIZE);
	SHDoneButton(this->m_hWnd, SHDB_HIDE);
	
	m_strAccount.SetWindowText(_T("1234567890"));	
	m_strPasswd.SetWindowText(_T("000000"));

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

BOOL CLogin::DestroyWindow() 
{
	AfxGetMainWnd()->SetWindowText(_T("        东方证券贴身理财"));	
	::SetForegroundWindow(AfxGetMainWnd()->m_hWnd);
	SHFullScreen(AfxGetMainWnd()->m_hWnd, SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON |   SHFS_HIDESTARTICON);
	
	return CDialog::DestroyWindow();
}

void CLogin::OnOK() 
{
	CString strAccount = _T("");
	CString strPwd = _T("");
	m_strAccount.GetWindowText(strAccount);
	m_strPasswd.GetWindowText(strPwd);
	((COrientStockApp*)AfxGetApp())->DoWaitCursor(1); // -1 ->>display the hourglass cursor
	Sleep(1000);
	((COrientStockApp*)AfxGetApp())->DoWaitCursor(-1); // -1 ->>display the hourglass cursor

	if( strAccount.GetLength()==10 && strPwd.GetLength()==6 ) 
	{
		COperator dlg;	// 用户操作界面
		dlg.DoModal();

	}

	CDialog::OnOK();
}

⌨️ 快捷键说明

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