【文章內(nèi)容簡(jiǎn)介】
X_Text(pDX, IDC_EDIT1, m_password)。 //}}AFX_DATA_MAP}BEGIN_MESSAGE_MAP(CAddressDlg, CDialog) //{{AFX_MSG_MAP(CAddressDlg) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_WM_TIMER() ON_WM_CLOSE() ON_WM_CTLCOLOR() //}}AFX_MSG_MAPEND_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////// CAddressDlg message handlersBOOL CAddressDlg::OnInitDialog(){ CDialog::OnInitDialog()。 // TODO: Add extra initialization here ()。 SetTimer(0,800,NULL)。 return TRUE。 // return TRUE unless you set the focus to a control}void CAddressDlg::OnSysCommand(UINT nID, LPARAM lParam){ if ((nID amp。 0xFFF0) == IDM_ABOUTBOX) { CAboutDlg dlgAbout。 ()。 } else { CDialog::OnSysCommand(nID, lParam)。 }}// If you add a minimize button to your dialog, you will need the code below// to draw the icon. For MFC applications using the document/view model,// this is automatically done for you by the framework.void CAddressDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this)。 // device context for painting SendMessage(WM_ICONERASEBKGND, (WPARAM) (), 0)。 // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON)。 int cyIcon = GetSystemMetrics(SM_CYICON)。 CRect rect。 GetClientRect(amp。rect)。 int x = (() cxIcon + 1) / 2。 int y = (() cyIcon + 1) / 2。 // Draw the icon (x, y, m_hIcon)。 } else { CDialog::OnPaint()。 }}// The system calls this to obtain the cursor to display while the user drags// the minimized window.HCURSOR CAddressDlg::OnQueryDragIcon(){ return (HCURSOR) m_hIcon。}b、登錄驗(yàn)證需要輸入密碼/////////////////////////////////////////////////////////////////////////////////名稱:OnOk//功能:要求輸入密碼//////////////////////////////////////////////////////////////////////////////void CAddressDlg::OnOK() { // TODO: Add extra validation here CPswdSet* m_