📄 notesendsystemview.cpp
字号:
// NoteSendSystemView.cpp : implementation of the CNoteSendSystemView class
//
#include "stdafx.h"
#include "NoteSendSystem.h"
#include "NoteSendSystemView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CNoteSendSystemView
IMPLEMENT_DYNCREATE(CNoteSendSystemView, CView)
BEGIN_MESSAGE_MAP(CNoteSendSystemView, CView)
//{{AFX_MSG_MAP(CNoteSendSystemView)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CNoteSendSystemView construction/destruction
CNoteSendSystemView::CNoteSendSystemView()
{
// TODO: add construction code here
}
CNoteSendSystemView::~CNoteSendSystemView()
{
}
BOOL CNoteSendSystemView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CNoteSendSystemView drawing
void CNoteSendSystemView::OnDraw(CDC* pDC)
{
CNoteSendSystemDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CNoteSendSystemView printing
BOOL CNoteSendSystemView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CNoteSendSystemView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CNoteSendSystemView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CNoteSendSystemView diagnostics
#ifdef _DEBUG
void CNoteSendSystemView::AssertValid() const
{
CView::AssertValid();
}
void CNoteSendSystemView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CNoteSendSystemDoc* CNoteSendSystemView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CNoteSendSystemDoc)));
return (CNoteSendSystemDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CNoteSendSystemView message handlers
void CNoteSendSystemView::OnInitialUpdate()
{
CView::OnInitialUpdate();
// SetTimer(1, 1000, NULL);
}
//DEL void CNoteSendSystemView::OnTimer(UINT nIDEvent)
//DEL {
//DEL if(nIDEvent == 1)
//DEL {
//DEL SM_PARAM SmParam;
//DEL CString strTime;
//DEL CString strNumber;
//DEL CString strContent;
//DEL
//DEL CNoteSendSystemApp *pApp = (CNoteSendSystemApp *)AfxGetApp();
//DEL // 取接收到的短消息
//DEL if(pApp->m_pSmsTraffic->GetRecvMessage(&SmParam))
//DEL {
//DEL // 取短消息信息
//DEL strNumber = SmParam.TPA; //目标号码或回复号码(TP-DA或TP-RA)
//DEL strContent = SmParam.TP_UD; //原始用户信息(编码前或解码后的TP-UD)
//DEL strTime = "20" + CString(&SmParam.TP_SCTS[0],2) //服务时间戳字符串(TP_SCTS), 接收时用到
//DEL + "-" + CString(&SmParam.TP_SCTS[2],2)
//DEL + "-" + CString(&SmParam.TP_SCTS[4],2)
//DEL + " " + CString(&SmParam.TP_SCTS[6],2)
//DEL + ":" + CString(&SmParam.TP_SCTS[8],2)
//DEL + ":" + CString(&SmParam.TP_SCTS[10],2);
//DEL
//DEL // 去掉号码前的"86"
//DEL if(strNumber.Left(2) == "86") strNumber = strNumber.Mid(2);
//DEL
//DEL
//DEL }
//DEL // CPaintDC dc(this);
//DEL // strContent = "123123213123";
//DEL // dc.TextOut(100 ,100, strContent);
//DEL // Invalidate();
//DEL }
//DEL else
//DEL {
//DEL CView::OnTimer(nIDEvent);
//DEL }
//DEL }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -