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

📄 dcall.cpp

📁 ,"智能大厦自动报警系统",是从赛奎春所主编的"C++信息系统开发实例精选"CD中拷贝出来的,对mscomm 控件进制转换串口通信等内容进行了详细介绍。
💻 CPP
字号:
// DCall.cpp : implementation file
//

#include "stdafx.h"
#include "yhjk.h"
#include "DCall.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDCall dialog


CDCall::CDCall(CWnd* pParent /*=NULL*/,CString sText)
	: CDialog(CDCall::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDCall)
	//}}AFX_DATA_INIT
	m_sText=sText;
}


void CDCall::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDCall)
	DDX_Control(pDX, IDC_EDT_TEXT, m_EdtText);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDCall, CDialog)
	//{{AFX_MSG_MAP(CDCall)
	ON_WM_PAINT()
	ON_WM_TIMER()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDCall message handlers

void CDCall::OnOK() 
{
	// TODO: Add extra validation here
	
	//CDialog::OnOK();
}

void CDCall::OnPaint() 
{
	CPaintDC dc(this); // device context for painting	
	// Do not call CDialog::OnPaint() for painting messages
	//载入背景
	CBitmap bit;
	bit.LoadBitmap(IDB_BITMAP1);
	CDC memDC;
	memDC.CreateCompatibleDC(&dc);
	memDC.SelectObject(&bit);
	dc.BitBlt(1,1,330,192,&memDC,0,0,SRCCOPY);
	memDC.DeleteDC();
	bit.DeleteObject();
}

void CDCall::OnTimer(UINT nIDEvent) 
{
	// TODO: Add your message handler code here and/or call default
	this->FlashWindow(true);
	CDialog::OnTimer(nIDEvent);
}

BOOL CDCall::OnInitDialog() 
{
	CDialog::OnInitDialog();
	CRect rect;
 	this->GetWindowRect(&rect);	
	this->m_EdtText.SetWindowText(m_sText);
	this->SetWindowPos(&wndTopMost,rect.top ,rect.left,rect.Width(),rect.Height(),SWP_SHOWWINDOW);
 	this->SetTimer(1,300,NULL);	
	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 + -