?? scanview.cpp
字號:
// scanView.cpp : implementation of the CScanView class
//
#include "stdafx.h"
#include "scan.h"
#include "scanDoc.h"
#include "scanView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CEdit* g_pEditCtrl;
/////////////////////////////////////////////////////////////////////////////
// CScanView
IMPLEMENT_DYNCREATE(CScanView, CEditView)
BEGIN_MESSAGE_MAP(CScanView, CEditView)
//{{AFX_MSG_MAP(CScanView)
ON_WM_CREATE()
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CScanView construction/destruction
CScanView::CScanView()
{
// TODO: add construction code here
}
CScanView::~CScanView()
{
}
BOOL CScanView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
BOOL bPreCreated = CEditView::PreCreateWindow(cs);
cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping
return bPreCreated;
}
/////////////////////////////////////////////////////////////////////////////
// CScanView drawing
void CScanView::OnDraw(CDC* pDC)
{
CScanDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CScanView printing
BOOL CScanView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default CEditView preparation
return CEditView::OnPreparePrinting(pInfo);
}
void CScanView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
{
// Default CEditView begin printing.
CEditView::OnBeginPrinting(pDC, pInfo);
}
void CScanView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
{
// Default CEditView end printing
CEditView::OnEndPrinting(pDC, pInfo);
}
/////////////////////////////////////////////////////////////////////////////
// CScanView diagnostics
#ifdef _DEBUG
void CScanView::AssertValid() const
{
CEditView::AssertValid();
}
void CScanView::Dump(CDumpContext& dc) const
{
CEditView::Dump(dc);
}
CScanDoc* CScanView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CScanDoc)));
return (CScanDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CScanView message handlers
int CScanView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CEditView::OnCreate(lpCreateStruct) == -1)
return -1;
/*
// TODO: Add your specialized creation code here
LOGFONT logFont;
logFont.lfCharSet=0;
logFont.lfHeight=-12;
logFont.lfWidth=0;
logFont.lfEscapement=0; //б
logFont.lfItalic=0;
logFont.lfUnderline=0;
logFont.lfStrikeOut=0;
logFont.lfClipPrecision=2;
CFont m_pFont;
m_pFont.CreateFontIndirect(&logFont);
CEdit &ed=GetEditCtrl();
CDC* pDC=ed.GetDC();
pDC->SetBkMode(OPAQUE);
pDC->SelectObject(&m_pFont);
//ed.SetFont(&m_pFont);
ed.setre
ed.ShowScrollBar(SB_HORZ);
*/
g_pEditCtrl=&GetEditCtrl();
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -