?? rectdoc.cpp
字號:
// RectDoc.cpp : implementation file
//
#include "stdafx.h"
#include "ex22.h"
#include "RectDoc.h"
#include "rectdlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CRectDoc
IMPLEMENT_DYNCREATE(CRectDoc, CDocument)
CRectDoc::CRectDoc()
{
m_length=200;
m_width=100;
}
BOOL CRectDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
return TRUE;
}
CRectDoc::~CRectDoc()
{
}
BEGIN_MESSAGE_MAP(CRectDoc, CDocument)
//{{AFX_MSG_MAP(CRectDoc)
ON_COMMAND(IC_INPUT_SIDES, OnInputSides)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CRectDoc diagnostics
#ifdef _DEBUG
void CRectDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CRectDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CRectDoc serialization
void CRectDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
ar<<m_length<<m_width;
}
else
{
// TODO: add loading code here
ar>>m_length>>m_width;
}
}
/////////////////////////////////////////////////////////////////////////////
// CRectDoc commands
void CRectDoc::OnInputSides()
{
// TODO: Add your command handler code here
m_RectDlg.m_length=m_length;
m_RectDlg.m_width=m_width;
if(m_RectDlg.DoModal()==IDOK)
{
m_length=m_RectDlg.m_length;
m_width=m_RectDlg.m_width;
}
UpdateAllViews(NULL);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -