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

📄 dialing.cpp

📁 vc++6.0 开发的电力系统故障滤波数据管理系统
💻 CPP
字号:
// Dialing.cpp : implementation file
//

#include "stdafx.h"
#include "wgl_32.h"
#include "Dialing.h"
#include "tty.h"

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

extern CTTY MyTTY;
/////////////////////////////////////////////////////////////////////////////
// CDialing dialog

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


void CDialing::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDialing)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CDialing message handlers

BOOL CDialing::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	
	GetDlgItem(IDC_TELEPHONE)->GetWindowRect(&m_PhoneNumRect);
	ScreenToClient(&m_PhoneNumRect);
    SetTimer(19691, 500, NULL);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CDialing::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here
	dc.SetBkMode(TRANSPARENT);
	dc.TextOut(m_PhoneNumRect.left+100, m_PhoneNumRect.top+30, m_strPhoneNumber);

	// Do not call CDialog::OnPaint() for painting messages
}


void CDialing::OnCancel() 
{
	// TODO: Add extra cleanup here
    KillTimer(19691);
	MyTTY.npTTYInfo->Queue[0] = 3;
	MyTTY.npTTYInfo->HeadPtr=1;
	EndDialog(IDCANCEL);
    CDialog::OnCancel();
}


void CDialing::OnTimer(UINT nIDEvent) 
{
	// TODO: Add your message handler code here and/or call default
	DWORD Status;
    BOOL i = GetCommModemStatus(COMDEV(MyTTY.npTTYInfo ), &Status);
	if(i && (Status &MS_RLSD_ON))
	  {
	   KillTimer(19691);
	   EndDialog(1);
	  }
}

⌨️ 快捷键说明

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