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

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

?? scribvw.cpp

?? 《深入淺出MFC》第二版PDF附源碼,詳細介紹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一区二区三区免费野_久草精品视频
久久午夜色播影院免费高清| 亚洲成人av电影| 亚洲日本青草视频在线怡红院| 亚洲va天堂va国产va久| 国产高清一区日本| 欧美肥胖老妇做爰| 中文字幕中文字幕一区| 日韩av电影一区| 99久久精品国产一区二区三区| 欧美xxxx在线观看| 亚洲国产一二三| 91在线一区二区| 国产欧美综合色| 日韩av中文在线观看| 色综合夜色一区| 国产女主播视频一区二区| 免费久久精品视频| 欧美女孩性生活视频| 亚洲欧洲中文日韩久久av乱码| 国产精品小仙女| 日韩欧美国产精品一区| 亚洲不卡av一区二区三区| 91网上在线视频| 中文字幕在线观看不卡| 风间由美一区二区av101| 久久精品一区二区三区不卡牛牛| 麻豆精品蜜桃视频网站| 欧美一区二区在线看| 亚洲国产日韩av| 在线免费观看一区| 亚洲精品videosex极品| 色中色一区二区| 亚洲色图视频网| 色偷偷一区二区三区| 亚洲精品成a人| 91福利精品第一导航| 亚洲一区二区欧美日韩| 欧美日韩国产另类一区| 亚洲成人www| 欧美高清视频一二三区 | 91福利视频久久久久| 一级精品视频在线观看宜春院| 99re这里只有精品视频首页| 成人免费在线观看入口| 91小宝寻花一区二区三区| 国产精品久久久久一区二区三区共 | 国产自产v一区二区三区c| 久久综合色鬼综合色| 国产夫妻精品视频| 中文字幕不卡一区| 91蝌蚪porny| 五月天精品一区二区三区| 欧美高清视频www夜色资源网| 免费不卡在线观看| 国产亚洲精品7777| youjizz久久| 亚洲男人天堂一区| 69成人精品免费视频| 国内精品第一页| 国产精品每日更新| 欧美日韩二区三区| 精品在线免费视频| 亚洲欧美在线视频| 欧美日韩精品二区第二页| 国内外成人在线| 亚洲少妇30p| 91麻豆精品国产自产在线观看一区| 裸体在线国模精品偷拍| 中文字幕中文字幕一区二区 | 欧美tickle裸体挠脚心vk| 成人激情免费网站| 亚洲mv在线观看| 欧美精品一区二区三区久久久| 成人免费观看视频| 天天色天天操综合| 欧美国产日韩亚洲一区| 欧美视频一区二区三区| 国产精品综合一区二区三区| 亚洲精品视频在线观看网站| 日韩欧美激情一区| 色悠悠亚洲一区二区| 黄色成人免费在线| 亚洲一卡二卡三卡四卡| 国产欧美日韩另类一区| 制服丝袜中文字幕一区| 波多野结衣在线一区| 蜜臀av一区二区| 一区二区三区精密机械公司| 久久久99久久| 91精品国产欧美一区二区18| 99riav久久精品riav| 国产精品12区| 久久激情五月激情| 亚洲国产一区二区在线播放| 中文字幕制服丝袜一区二区三区| 日韩一区二区高清| 欧美日韩一级视频| 色婷婷综合久久久中文字幕| 高清不卡一区二区| 国产在线国偷精品免费看| 亚洲va韩国va欧美va| 亚洲综合色自拍一区| 中文字幕佐山爱一区二区免费| 欧美精品一区二区三区蜜桃| 91超碰这里只有精品国产| 色综合av在线| 91女神在线视频| 99视频国产精品| 成人国产在线观看| 国产成人精品影视| 国产精品一区二区免费不卡| 美腿丝袜亚洲一区| 久久er精品视频| 久久不见久久见中文字幕免费| 日韩精品乱码免费| 另类小说欧美激情| 精品一区免费av| 精品在线亚洲视频| 国产精品亚洲人在线观看| 国产一区二区精品在线观看| 狠狠久久亚洲欧美| 国产乱码精品1区2区3区| 国产成人综合网| 国产成人免费在线| 成人激情动漫在线观看| 91麻豆高清视频| 日本丶国产丶欧美色综合| 欧美在线综合视频| 欧美精品乱码久久久久久按摩| 欧美三级韩国三级日本三斤| 欧美日韩一区二区三区四区| 欧美日韩国产高清一区二区三区| 91麻豆精品国产91久久久久久| 欧美高清一级片在线| 精品盗摄一区二区三区| 久久久久久97三级| 18成人在线观看| 亚洲国产人成综合网站| 麻豆成人综合网| 国产成a人无v码亚洲福利| 91亚洲国产成人精品一区二三| 色婷婷激情综合| 欧美一区二区成人| 久久亚洲精华国产精华液| 国产精品免费丝袜| 亚洲成人av一区二区| 国产酒店精品激情| 色婷婷久久久久swag精品| 欧美xxxxxxxx| 国产精品久久久久久久久免费桃花| 一区二区三区在线视频免费| 日本伊人色综合网| 国产一区二区三区免费| 91免费看视频| 欧美一区二区三区视频免费| 国产午夜精品一区二区| 热久久免费视频| 国产黄人亚洲片| 91久久精品国产91性色tv| 精品国产一区久久| 自拍偷拍亚洲激情| 免费不卡在线观看| 欧美在线999| 久久久青草青青国产亚洲免观| 亚洲黄色av一区| 国产成人精品免费网站| 欧美电影一区二区三区| 日本不卡一区二区| 成人理论电影网| 日韩欧美成人激情| 亚洲综合精品自拍| 成人久久视频在线观看| 欧美白人最猛性xxxxx69交| 亚洲国产日韩精品| 91美女片黄在线| 久久精品一区二区三区不卡牛牛| 日本系列欧美系列| 欧美图区在线视频| 日韩一区中文字幕| 国产成人精品网址| 久久奇米777| 日韩制服丝袜av| 欧美三电影在线| 亚洲免费高清视频在线| av在线播放不卡| 久久久久久久久一| 国产一区欧美二区| xvideos.蜜桃一区二区| 久久精品国产亚洲5555| 日韩欧美一区二区免费| 手机精品视频在线观看| 欧美日韩一区视频| 亚洲一区二区视频| 在线亚洲一区观看| 一区二区三区产品免费精品久久75| www.色精品| ●精品国产综合乱码久久久久| 国产成人高清视频| 国产日韩精品一区二区浪潮av | 久久综合狠狠综合久久激情 |