📄 sms_duanxinview.cpp
字号:
// SMS_duanxinView.cpp : implementation of the CSMS_duanxinView class
//
#include "stdafx.h"
#include "SMS_duanxin.h"
#include "SMS_duanxinDoc.h"
#include "SMS_duanxinView.h"
#include "SendDlg.h"
#include "RecDlg.h"
#include "SettingDlg.h"
#include "PhonebookDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSMS_duanxinView
IMPLEMENT_DYNCREATE(CSMS_duanxinView, CView)
BEGIN_MESSAGE_MAP(CSMS_duanxinView, CView)
//{{AFX_MSG_MAP(CSMS_duanxinView)
ON_COMMAND(ID_FILE_WRITE, OnFileWrite)
ON_COMMAND(ID_SEND, OnSend)
ON_COMMAND(ID_REC, OnRec)
ON_COMMAND(IDM_SETTING, OnSetting)
ON_COMMAND(ID_TELELIST, OnTelelist)
//}}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()
/////////////////////////////////////////////////////////////////////////////
// CSMS_duanxinView construction/destruction
CSMS_duanxinView::CSMS_duanxinView()
{
// TODO: add construction code here
}
CSMS_duanxinView::~CSMS_duanxinView()
{
}
BOOL CSMS_duanxinView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
//改变窗口形式
cs.cx = 500;
cs.cy = 300;
cs.style |= LVS_SHOWSELALWAYS | LVS_REPORT;
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CSMS_duanxinView drawing
void CSMS_duanxinView::OnDraw(CDC* pDC)
{
CSMS_duanxinDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CSMS_duanxinView printing
BOOL CSMS_duanxinView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CSMS_duanxinView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CSMS_duanxinView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CSMS_duanxinView diagnostics
#ifdef _DEBUG
void CSMS_duanxinView::AssertValid() const
{
CView::AssertValid();
}
void CSMS_duanxinView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CSMS_duanxinDoc* CSMS_duanxinView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSMS_duanxinDoc)));
return (CSMS_duanxinDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CSMS_duanxinView message handlers
void CSMS_duanxinView::OnFileWrite() //添加电话号码
{
// TODO: Add your command handler code here
CFile file;
CString add;
add+="电话本.txt";
if(!file.Open(add,CFile::modeWrite))
{;}
}
/*void CSMS_duanxinView::OnMenuitem32773()
{
// TODO: Add your command handler code here
}*/
//菜单项发件箱响应
void CSMS_duanxinView::OnSend()
{
// TODO: Add your command handler code here
CSendDlg send;
send.DoModal();
}
//菜单项收件箱响应
void CSMS_duanxinView::OnRec()
{
// TODO: Add your command handler code here
CRecDlg rec;
rec.DoModal();
}
////菜单项设置响应
void CSMS_duanxinView::OnSetting()
{
// TODO: Add your command handler code here
CSettingDlg set;
set.DoModal();
}
void CSMS_duanxinView::OnTelelist()
{
// TODO: Add your command handler code here
CPhonebookDlg telelist;
telelist.DoModal();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -