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

📄 adddlg.cpp

📁 通讯录软件
💻 CPP
字号:
// ADDDLG.cpp : implementation file
//

#include "stdafx.h"
#include "TXL.h"
#include "ADDDLG.h"

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

/////////////////////////////////////////////////////////////////////////////
// CADDDLG dialog


CADDDLG::CADDDLG(CWnd* pParent /*=NULL*/)
	: CDialog(CADDDLG::IDD, pParent)
{
	//{{AFX_DATA_INIT(CADDDLG)
	m_name = _T("");
	m_phone = _T("");
	m_qq = _T("");
	m_address = _T("");
	m_other = _T("");
	//}}AFX_DATA_INIT
}


void CADDDLG::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CADDDLG)
	DDX_Text(pDX, IDC_EDIT1, m_name);
	DDX_Text(pDX, IDC_EDIT2, m_phone);
	DDX_Text(pDX, IDC_EDIT3, m_qq);
	DDX_Text(pDX, IDC_EDIT4, m_address);
	DDX_Text(pDX, IDC_EDIT5, m_other);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CADDDLG message handlers

BOOL CADDDLG::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
ShowWindow(SW_HIDE); 
 CRect dlgRect; 
 GetClientRect(&dlgRect); 
 CPoint centerPoint; 
 centerPoint.x=dlgRect.Width()/2; 
 centerPoint.y=dlgRect.Height()/2;//得到对话框的中点坐标 
 CRgn testrgn; 
 this->ShowWindow(SW_HIDE);   
 int m=GetSystemMetrics(SM_CYSIZEFRAME); 
  
 //以下代码实现对话框的动态弹出 
  
 for (int i=10;i<dlgRect.Width()/2+m;i+=1) 
 {    
  testrgn.CreateRectRgn(centerPoint.x-i,centerPoint.y-i,centerPoint.x+i,centerPoint.y+i); 
  SetWindowRgn((HRGN) testrgn,TRUE); 
  ShowWindow(SW_SHOW); 
  CenterWindow(); 
  testrgn.DeleteObject(); 
 }	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

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