亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? scribvw.cpp

?? 很有用的mfc書籍,看后感觸很深,大家都收藏啊
?? CPP
字號:
// ScribVw.cpp : implementation of the CScribbleView class
//
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1995 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.

#include "stdafx.h"
#include "Scribble.h"

#include "ScribDoc.h"
#include "ScribVw.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CScribbleView

IMPLEMENT_DYNCREATE(CScribbleView, CScrollView)

BEGIN_MESSAGE_MAP(CScribbleView, CScrollView)
	//{{AFX_MSG_MAP(CScribbleView)
	ON_WM_LBUTTONDOWN()
	ON_WM_LBUTTONUP()
	ON_WM_MOUSEMOVE()
	//}}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()

/////////////////////////////////////////////////////////////////////////////
// CScribbleView construction/destruction

CScribbleView::CScribbleView()
{
	// TODO: add construction code here

}

CScribbleView::~CScribbleView()
{
}

BOOL CScribbleView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CScribbleView drawing

void CScribbleView::OnDraw(CDC* pDC)
{
	CScribbleDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	// Get the invalidated rectangle of the view, or in the case
	// of printing, the clipping region of the printer dc.
	CRect rectClip;
	CRect rectStroke;
	pDC->GetClipBox(&rectClip);

	// Note: CScrollView::OnPaint() will have already adjusted the
	// viewport origin before calling OnDraw(), to reflect the
	// currently scrolled position.

	// The view delegates the drawing of individual strokes to
	// CStroke::DrawStroke().
	CTypedPtrList<CObList,CStroke*>& strokeList = pDoc->m_strokeList;
	POSITION pos = strokeList.GetHeadPosition();
	while (pos != NULL)
	{
		CStroke* pStroke = strokeList.GetNext(pos);
		rectStroke = pStroke->GetBoundingRect();
		if (!rectStroke.IntersectRect(&rectStroke, &rectClip))
			continue;
		pStroke->DrawStroke(pDC);
	}
}

/////////////////////////////////////////////////////////////////////////////
// CScribbleView printing

BOOL CScribbleView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CScribbleView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CScribbleView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

/////////////////////////////////////////////////////////////////////////////
// CScribbleView diagnostics

#ifdef _DEBUG
void CScribbleView::AssertValid() const
{
	CScrollView::AssertValid();
}

void CScribbleView::Dump(CDumpContext& dc) const
{
	CScrollView::Dump(dc);
}

CScribbleDoc* CScribbleView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CScribbleDoc)));
	return (CScribbleDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CScribbleView message handlers

void CScribbleView::OnLButtonDown(UINT, CPoint point) 
{
    // Pressing the mouse button in the view window starts a new stroke

	// CScrollView changes the viewport origin and mapping mode.
	// It's necessary to convert the point from device coordinates
	// to logical coordinates, such as are stored in the document.
	CClientDC dc(this);
	OnPrepareDC(&dc);
	dc.DPtoLP(&point);

	m_pStrokeCur = GetDocument()->NewStroke();
	// Add first point to the new stroke
	m_pStrokeCur->m_pointArray.Add(point);

	SetCapture();       // Capture the mouse until button up.
	m_ptPrev = point;   // Serves as the MoveTo() anchor point for the
						// LineTo() the next point, as the user drags the
						// mouse.

	return;
}

void CScribbleView::OnLButtonUp(UINT, CPoint point) 
{
	// Mouse button up is interesting in the Scribble application
	// only if the user is currently drawing a new stroke by dragging
	// the captured mouse.

	if (GetCapture() != this)
		return; // If this window (view) didn't capture the mouse,
				// then the user isn't drawing in this window.

	CScribbleDoc* pDoc = GetDocument();

	CClientDC dc(this);

	// CScrollView changes the viewport origin and mapping mode.
	// It's necessary to convert the point from device coordinates
	// to logical coordinates, such as are stored in the document.
	OnPrepareDC(&dc);  // set up mapping mode and viewport origin
	dc.DPtoLP(&point);

	CPen* pOldPen = dc.SelectObject(pDoc->GetCurrentPen());
	dc.MoveTo(m_ptPrev);
	dc.LineTo(point);
	dc.SelectObject(pOldPen);
	m_pStrokeCur->m_pointArray.Add(point);

	// Tell the stroke item that we're done adding points to it.
	// This is so it can finish computing its bounding rectangle.
	m_pStrokeCur->FinishStroke();

	// Tell the other views that this stroke has been added
	// so that they can invalidate this stroke's area in their
	// client area.
	pDoc->UpdateAllViews(this, 0L, m_pStrokeCur);

	ReleaseCapture();   // Release the mouse capture established at
						// the beginning of the mouse drag.
	return;
}

void CScribbleView::OnMouseMove(UINT, CPoint point) 
{
	// Mouse movement is interesting in the Scribble application
	// only if the user is currently drawing a new stroke by dragging
	// the captured mouse.

	if (GetCapture() != this)
		return; // If this window (view) didn't capture the mouse,
				// then the user isn't drawing in this window.

	CClientDC dc(this);
	// CScrollView changes the viewport origin and mapping mode.
	// It's necessary to convert the point from device coordinates
	// to logical coordinates, such as are stored in the document.
	OnPrepareDC(&dc);
	dc.DPtoLP(&point);

	m_pStrokeCur->m_pointArray.Add(point);

	// Draw a line from the previous detected point in the mouse
	// drag to the current point.
	CPen* pOldPen = dc.SelectObject(GetDocument()->GetCurrentPen());
	dc.MoveTo(m_ptPrev);
	dc.LineTo(point);
	dc.SelectObject(pOldPen);
	m_ptPrev = point;
	return;
}

void CScribbleView::OnUpdate(CView* /* pSender */, LPARAM /* lHint */, 
	CObject* pHint) 
{
	// The document has informed this view that some data has changed.

	if (pHint != NULL)
	{
		if (pHint->IsKindOf(RUNTIME_CLASS(CStroke)))
		{
			// The hint is that a stroke as been added (or changed).
			// So, invalidate its rectangle.
			CStroke* pStroke = (CStroke*)pHint;
			CClientDC dc(this);
			OnPrepareDC(&dc);
			CRect rectInvalid = pStroke->GetBoundingRect();
			dc.LPtoDP(&rectInvalid);
			InvalidateRect(&rectInvalid);
			return;
		}
	}
	// We can't interpret the hint, so assume that anything might
	// have been updated.
	Invalidate(TRUE);
	return;
}

void CScribbleView::OnInitialUpdate() 
{
	SetScrollSizes(MM_TEXT, GetDocument()->GetDocSize());
	CScrollView::OnInitialUpdate();
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美另类小说视频| 中文字幕一区视频| 欧美婷婷六月丁香综合色| gogogo免费视频观看亚洲一| 国产精品白丝jk黑袜喷水| 久久精品国产秦先生| 韩国av一区二区三区| 国产盗摄一区二区三区| 成人av在线播放网站| 波多野结衣精品在线| 99re亚洲国产精品| 在线日韩一区二区| 欧美日韩激情在线| 欧美一级在线免费| 久久精品一区八戒影视| 中文字幕国产一区二区| 中文字幕在线一区二区三区| 亚洲免费观看在线观看| 亚洲第一av色| 国产一区视频导航| 色综合久久综合| 欧美精品一二三| 久久夜色精品国产噜噜av| 国产精品二三区| 亚洲成av人片www| 久久国产福利国产秒拍| 国产毛片精品视频| 色综合久久天天| 日韩欧美专区在线| 中文字幕亚洲不卡| 五月天一区二区| 粉嫩蜜臀av国产精品网站| 91丨porny丨在线| 欧美不卡一区二区| 亚洲欧美日韩国产综合| 老司机午夜精品| 91无套直看片红桃| 久久亚洲私人国产精品va媚药| 国产精品―色哟哟| 美腿丝袜亚洲一区| 99re66热这里只有精品3直播| 欧美高清视频一二三区 | 欧美一区二区三区的| 久久久亚洲欧洲日产国码αv| 亚洲啪啪综合av一区二区三区| 人人精品人人爱| 日本精品一区二区三区高清| 久久亚洲精品小早川怜子| 一区二区三区欧美| 国产91精品在线观看| 91精品国产综合久久久久久| 亚洲女人小视频在线观看| 激情五月婷婷综合| 6080午夜不卡| 亚洲午夜久久久久久久久电影网 | 亚洲欧美国产三级| 麻豆精品一区二区| 91精品午夜视频| 亚洲国产综合人成综合网站| 北岛玲一区二区三区四区| 精品女同一区二区| 美洲天堂一区二卡三卡四卡视频 | 免费成人av资源网| 精品视频在线看| 夜夜嗨av一区二区三区中文字幕| 成人综合婷婷国产精品久久蜜臀| 日韩精品一区二区三区视频在线观看| 亚洲国产成人av| 在线影视一区二区三区| 亚洲乱码日产精品bd| 成人精品在线视频观看| 欧美国产精品劲爆| 成人av在线播放网站| 国产精品三级电影| 99精品在线观看视频| 国产精品国产三级国产aⅴ原创| 国产aⅴ综合色| 国产精品视频看| 91在线精品一区二区三区| 亚洲欧洲国产日韩| 色呦呦网站一区| 亚洲最大的成人av| 欧美精品一卡两卡| 狠狠狠色丁香婷婷综合激情| 久久久久国产一区二区三区四区| 国产精品一二三四| 国产精品免费久久久久| 99热精品国产| 亚洲综合在线免费观看| 欧美伊人精品成人久久综合97| 亚洲综合在线电影| 欧美一二三在线| 韩国在线一区二区| 亚洲欧美一区二区久久| 欧美日韩免费观看一区三区| 日本中文在线一区| 久久久亚洲高清| 色一情一伦一子一伦一区| 午夜国产精品一区| 久久久久久综合| 91高清视频在线| 日韩va欧美va亚洲va久久| 精品毛片乱码1区2区3区| 成人黄色小视频| 五月天一区二区| 亚洲国产激情av| 91 com成人网| 成熟亚洲日本毛茸茸凸凹| 一区二区三区四区五区视频在线观看| 欧美猛男超大videosgay| 国产又粗又猛又爽又黄91精品| 1区2区3区欧美| 欧美一区二区三区免费视频| 大陆成人av片| 亚洲成a人片在线不卡一二三区| 久久女同精品一区二区| 欧美综合亚洲图片综合区| 久久国产三级精品| 亚洲一区二区三区中文字幕| 精品久久久久久无| 在线观看区一区二| 国产激情一区二区三区四区 | 成人美女视频在线观看18| 日日骚欧美日韩| 亚洲美女屁股眼交| 久久久五月婷婷| 精品理论电影在线观看| 欧洲视频一区二区| a美女胸又www黄视频久久| 国产原创一区二区三区| 丝瓜av网站精品一区二区| 成人欧美一区二区三区黑人麻豆| 91精品国产色综合久久不卡蜜臀| 色琪琪一区二区三区亚洲区| 国产精品99久久久久久久vr| 日韩国产精品91| 亚洲综合精品自拍| 亚洲人一二三区| 国产精品大尺度| 中文字幕欧美激情| 精品国精品自拍自在线| 制服丝袜激情欧洲亚洲| 91久久精品一区二区| 色综合久久中文字幕| 91丝袜呻吟高潮美腿白嫩在线观看| 国产麻豆欧美日韩一区| 国产曰批免费观看久久久| 蜜臀精品一区二区三区在线观看| 午夜精品视频在线观看| 有码一区二区三区| 亚洲综合一二区| 性久久久久久久久| 偷窥国产亚洲免费视频| 日本aⅴ免费视频一区二区三区| 亚洲国产wwwccc36天堂| 午夜激情久久久| 麻豆一区二区三区| 国产一区欧美一区| 大胆欧美人体老妇| 99久久婷婷国产| 在线精品视频一区二区| 欧美理论电影在线| 日韩欧美电影在线| 国产午夜久久久久| 亚洲欧洲www| 亚洲成人动漫精品| 激情都市一区二区| 丁香网亚洲国际| 色婷婷亚洲一区二区三区| 欧美视频一区二| 精品国产乱码久久| 国产精品亲子乱子伦xxxx裸| 亚洲视频每日更新| 日本网站在线观看一区二区三区| 久久av老司机精品网站导航| 国产一区二区0| 色婷婷狠狠综合| 欧美一区二区美女| 国产精品福利影院| 三级欧美在线一区| 国产乱码一区二区三区| 色噜噜狠狠色综合中国| 911精品国产一区二区在线| 久久亚区不卡日本| 亚洲精品久久久久久国产精华液 | 久久天天做天天爱综合色| 国产精品欧美一区二区三区| 一区二区三区在线影院| 久久精品国产77777蜜臀| 99这里都是精品| 在线综合亚洲欧美在线视频| 国产精品久久网站| 麻豆精品一区二区综合av| 97精品视频在线观看自产线路二| 欧美丰满高潮xxxx喷水动漫| 中文字幕免费观看一区| 日韩精品一二三| 99精品视频一区| 国产午夜精品久久| 日韩电影免费在线|