📄 automakedoc.cpp
字号:
// AutoMakeDoc.cpp : implementation of the CAutoMakeDoc class
//
#include "stdafx.h"
#include "AutoMake.h"
#include "AutoMakeDoc.h"
#include "InputDlg.h"
#include "AutoMakeView0.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAutoMakeDoc
IMPLEMENT_DYNCREATE(CAutoMakeDoc, CDocument)
BEGIN_MESSAGE_MAP(CAutoMakeDoc, CDocument)
//{{AFX_MSG_MAP(CAutoMakeDoc)
ON_COMMAND(ID_INPUT, OnInput)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAutoMakeDoc construction/destruction
CAutoMakeDoc::CAutoMakeDoc()
{
// TODO: add one-time construction code here
m_strR="a(a|b)*\n(a|b)*(aa|bb)(a|b)*";
}
CAutoMakeDoc::~CAutoMakeDoc()
{
}
BOOL CAutoMakeDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CAutoMakeDoc serialization
void CAutoMakeDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
}
/////////////////////////////////////////////////////////////////////////////
// CAutoMakeDoc diagnostics
#ifdef _DEBUG
void CAutoMakeDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CAutoMakeDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CAutoMakeDoc commands
void CAutoMakeDoc::OnInput()
{
// TODO: Add your command handler code here
CInputDlg dlg;
if(IDOK==dlg.DoModal())
{
m_strR=dlg.m_Edit;
POSITION pos = GetFirstViewPosition();
CView*pView;
for(int i=0;i<2;i++)
pView=GetNextView(pos);/*获取CWndView0的指针*/
((CAutoMakeView0*)pView)->ShowRList();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -