1. 首页 > 手机 >

draw和paint区别 draw和paint有什么不同

MFC中OnDraw和OnPaint的区别

paint : 指为装饰等目的,而把油漆或涂料等物涂于物体表面

(一) OnPaint 和 OnDraw(1)OnPaint是WM_PAINT消息的消息处理函数,在OnPaint中调用OnDraw,一般来说,用户自己的绘图代码应放在OnDraw中。

draw和paint区别 draw和paint有什么不同draw和paint区别 draw和paint有什么不同


[句子错误] 本句语法不规范,请检查!

(2)OnPaint()是CWnd的类成员,负责响应WM_PAINT消息。OnDraw()是CVIEW的成员函数,没有响应消息的功能.

(5)在OnPaint中,将调用BeginPaint,用来获得客户区的显示设备环境,并以此调用GDI函数执行绘图作。在绘图作完成后,将调用EndPaint以释放显示设备环境。而OnDraw在BeginPaint与EndPaint间被调用。

(二) MFC结构

(1)在MFC结构里OnPaint是CWnd的成员函数. OnDraw是CView的成员函数.

(2)OnPaint()调用OnDraw(),OnPrint也会调用OnDraw(),所以OnDraw()是显示和打印的共同作。

(3)OnPaint是WM_PAINT消息引发的重绘消息处理函数,在OnPaint中会调用OnDraw来进行绘图。

1. OnPaint中首先构造一个CPaintDC类得实例,然后以这个实例为参数来调用虚函数OnPrepareDC来进行一些绘制前的一些处理,比设置映射模式,调用OnDraw。

2. OnDraw和OnPrepareDC不是消息处理函数。所以在不是因为重绘消息所引发的OnPaint导致OnDraw被调用时,比如在OnLButtonDown等消息处理函数中绘图时,要先自己调用OnPrepareDC。

(4)至于CPaintDC和CDC根本是两回事情:

1. CPaintDC是一个设备环境类,在OnPaint中作为参数传递给OnPrepareDC来作设备环境的设置。

2. 真正和CDC具有可比性的是CWindowDC,他们一个是描述客户区域,一个是描述整个屏幕。 如果是对CVIEW或从CVIEW类派生的窗口绘图时应该用OnDraw。

(三) OnDraw()和OnPaint()区别

2. 其次:要想在屏幕上绘图或显示图形,首先需要建立设备环境DC。其实DC是一个数据结构,它包含输出设备(不单指你的纯屏显示器,还包括打印机之类的输出设备)的绘图属性的描述。MFC提供了CPaintDC类和CWindwoDC类来实时的响应,而CPaintDC支持重画。当视图变得无效时(包括大小的改变,移动,被遮盖等等),Windows 将 WM_PAINT 消息发送给它。该视图的OnPaint 处理函数通过创建 CPaintDC 类的DC对象来响应该消息并调用视图的 OnDraw 成员函数。通常我们不必编写重写的 OnPaint 处理成员函数。

///CView默认的标准的重画函数

{CPaintDC dc(this);

OnPrepareDC(&dc);

}///CView默认的标英[dr?:]准的OnPrint函数

void CView::OnPrint(CDC pDC, CPrintInfo)

{ASSERT_VALID(pDC);

OnDraw(pDC); // Call Draw

}既然OnPaint也要调用OnDraw,因此我们一般会在OnDraw函数中进行绘制。下面是一个典型的程序。

///视图中的绘图代码首先检索指向文档的指针,然后通过DC进行绘图调用。

{CMyDoc pDoc = GetDocument();

CString s = pDoc->GetData();

GetRect( &rect ); // Returns a CString CRect rect;

pDC->SetTextAlign( TA_BASELINE | TA_CENTER );

pDC->TextOut( rect.right / 2, rect.bottom / 2, s, s.GetLength() );

}3. :现在大家明白这哥俩之间的关系了吧。因此我们一般用OnPaint维护窗口的客户区(例如我们的窗口客户区加一个背景),用OnDraw维护视图的客户区(例如我们通过鼠标在视图中画图)。当然你也可以不按照上面规律来,只要达到目的并且没有问题,怎么干都成。

4. 补充:我们还可以利用Invalidate(),ValidateRgn(),ValidateRect()函数强制的重画窗口,具体的请参考MSDN的CWnd::Invalidate .

5. OnDraw中可以绘制用户区域。OnPaint中只是当窗口无效时重绘不会保留CDC绘制的内容。

(四)、这两个函数有区别也有联系:

2、联系:我们一般在视类中作图的时候,往往不直接响应WM_PANIT消息,而是重载OnDraw纯虚函数,这是因为在CVIEW类中的WM_PANIT消息响应函数中调用了OnDraw函数。如果在我们自己定义的类CMYVIEW中响应了WM_PAINT消息,不显式地调用OnDraw函数的话,是不会在窗口重绘的时候调用OnDraw函数的(显式调用必须自己准备设备环境( CDC pDC=GetDC(); OnDraw(pDC); ).)。

3、应用程序中几乎所有的绘图都在视图的 OnDraw 成员函数中发生,必须在视图类中重写该成员函数。(鼠标绘图是个特例,这在通过视图解释用户输入中讨论。)

4、OnDraw 重写: 通过调用您提供的文档成员函数获取数据。 通过调用框架传递给 OnDraw 的设备上下文对象的成员函数来显示数据。 当文档的数据以某种方式更改后,必须重绘视图以反映该更改。默认的 OnUpdate 实现使视图的整个工作区无效。当视图变得无效时,Windows 将 WM_PAINT 消息发送给它。该视图的 OnPaint 处理函数通过创建 CPaintDC 类的设备上下文对象来响应该消息并调用视图的 OnDraw 成员函数。

6、OnEraseBkGnd(),是窗口背景需要刷新时由系统调用的。明显的一个例子是设置窗口的背景颜色(你可以把这放在OnPaint中去做,但是会使产生闪烁的现象)。 至于怎么界定背景和前景,那要具体问题具体分析了,一般情况下,你还是很容易区别的吧。

(五)

OnPaint()用来响应WM_PAINT消息,视类的OnPaint()内部根据是打印还是屏幕绘制分别以不同的参数调用OnDraw()虚函数。所以在OnDraw()里你可以区别对待打印和屏幕绘制。 其实,MFC在进行打印前后还做了很多工作,调用了很多虚函数,比如OnPreparePrint()等。

对于OnDraw() :This mod is called by the framework to render an image of the document. The framework calls this mod to perform screen display, printing, and print preview, and it passes a different dev context in each case. There is no default implementation.

英语作文修改

[拼写错误] aninterview 拼写错误,可替换选项为:an interview, an-interview, interview

1.1 In contemporary society, the issue of whatcan TV brings to children touches off a flurry of controversy and debate.

[拼写错误] whatcan 拼写错误,可替换选项为:what can, what-can, Vatican

[学习提示] 易混词汇: bring, carry, take, fetch, get, convey, transport 均有“带,拿,取”之意。

1.2 As weall know, no invention has received more praise and abuse than TV.

[拼写错误] weall 拼写错误,可替换选项为:we all, we-all, Wall

[低频警示] more praise and abuse 在语料库中无此用法,疑似中式英语

[学习提示] 易混词汇: accept, receive, admit, take 均有“接受,接纳”之意。

[批改提示] know近义表达有cognize/ recognize/ re画画的英语单词可以是draw,也可以是paintdraw通常是指用铅笔钢笔或粉笔等绘画paint通常指用颜料绘画画画的英文paint和draw区别 这两个词都表示“画画”,其区别在于draw指用铅笔画素描类画,paint常指用色彩画水彩画。alize/ foreknow

[批改提示] praise的近义表达有compliment。

1.3 Some ileon that TV can bring children not only some specific things like knowledge, butalso some specific things such as happy, itiveness.

[词语错误] 表达不规范,some+名词单数不规范,建议修改。

[拼写错误] ileon 拼写错误,可替换选项为:ile on, ile-on, iling

[拼写错误] butalso 拼写错误,可替换选项为:but also, but-also, Beatles

[学习提示] 易混词汇: fourable, fortunate, happy, lucky 都可表示“有利的,好运的,顺利的”之意

1.4 While some frown at it, claiming that TV is a thing affects people negatively.

[搭配统计] 动名搭配 affect...people 在教材中出现过 1341 次

[学习提示] 易混词汇: affect, influence, impress 均含“影响”之意。

[批改提示] people表示“人,民族”。注意与person的区别。详情点击

1.5 On the balance, my forgoes to the latter with the reasons I will detail below.

[动词错误] 语法错误,建议将will+名词改为will+动词原形。

[拼写错误] forgoes 拼写错误,可替换选项为:for goes, for-goes, forgoes

[低频警示] the latter with the reasons 在语料库中无此用法,疑似中式英语

[学习提示] 易混词汇: remainder, surplus, rest, remains, balance 均含“剩余部分”之意。

[句子警示] 本句时态和其他句子时态不一致

1.6 Firstly, it do harm to our eyes.

[句子错误] 主谓不一致,建议将it do改为it does。

[动词错误] 建议句中, it后面的动词用单数形式

[学习提示] 易混词汇: hurt, injure, wound, harm, damage, disable 均有“损害,伤害”之意。

1.7 Accordingto a recent survey, 70%children get shortsightedness per year.

[低频警示] get...shortsightedness 在语料库中无此用法,疑似中式英语

[学习提示] 易混词汇: modern, contemporary, current, recent, present, up-to-date 均有“现代的,当代的”之意。

1.8 Not hard toimagine that the major cause linked to TV.

[拼写错误] toimagine 拼写错误,可替换选项为:to imagine, to-imagine, imagine

[学习提示] 易混词汇: difficult, hard 均有“困难”之意。

[教师点评] cause表示“原因,理由”。注意与reason的区别。详情点击

1.9 A scientific research has proved thatwatching TV 2hours a day will lead to shortsightedness in 6months.

[拼写错误其实我都能给你,但是只是也要靠你自己积累,多查一查字典,比较一下例句是不难发现他们的异的。故余下的请你自己查一查,好吗?] thatwatching 拼写错误,可替换选项为:that watching, that-watching, thatching

[批改提示] lead to的近义表达有contribute to/conduce to/result in 。

[批改提示] prove近义表达有verify/ evidence/ confirm/ ascertain/ evince

1.10 Take mybrother for example.

[拼写错误] mybrother 拼写错误,可替换选项为:my brother, my-brother, brother

1.11 Tom, a 10-year-old boy, need to wear glasses this year.

[搭配统计] 动名搭配 wear...glass 在教材中出现过 764 次

[学习提示] 易混词汇: cup, glass, mug 均可表示“杯,杯子”之意。

1.12 Although it is hard to imagine that he spends more that 3 hours on hiscartoons, I bet many kids has the same behior as him.

[拼写错误] hiscartoons 拼写错误,可替换选项为:his cartoons, his-cartoons, Huston's

[低频警示] the same behior as him 在语料库中无此用法,疑似中式英语

[搭配统计] 动名搭配 bet...kid 在教材中出现过 11 次

[搭配统计] 动名搭配 he...behior 在教材中出现过 82 次

[学习提示] 易混词汇: behior, conduct, manner 均含有“行为,举止”之意。

[拼写错误] beforings 拼写错误,可替换选项为:before things, before-things, breathings

1.14 I think teachers are suped to encourage students to readingmore books, because reading books in a proper way will not do harm to our eyes.

[拼写错误] readingmore 拼写错误,可替换选项为:reading more, reading-more, Reading

[低频警示] books in a proper way 在语料库中无此用法,疑似中式英语

[搭配统计] 动名搭配 encourage...student 在教材中出现过 132 次

[学习提示] 易混词汇: encourage, inspire, excite, stimulate 均表“鼓励,激励”之意。

[批改提示] 此句型用的太过频繁,建议改为. supe/claim+从句.

1.15 Secondly, we cannot oid kids watching TV series or movies that concludes violence.

[搭配错误] 搭配不当,建议将oid 改为prnt 。

[低频警示] conclude...violence 在语料库中无此用法,疑似中式英语

[低频警示] cannot oid 在语料库中无此用法,疑似中式英语

[搭配统计] 动名搭配 oid...kid 在教材中出现过 5 次

1.16 Apsychologist indicates that the violent contents in the TVs are a majorityreason linked to ager crimination.

[拼写错误] majorityreason 拼写错误,可替换选项为:majority reason, majority-reason, majorities

[拼写错误] crimination 拼写错误,可替换选项为:rumination, recrimination, culmination

[低频警示] the violent contents 在语料库中无此用法,疑似中式英语

[学习提示] 易混词汇: denote, indicate 都有“表示”之意。

1.17 It is not difficult for us to find someagers fight with others or drug in news.

[拼写错误] someagers 拼写错误,可替换选项为:some agers, some-agers, Smetana's

[低频警示] drug in news 在语料库中无此用法,疑似中式英语

[批改提示] find指一般生活中的发现。注意与discover区别。详情点击

1.18 For instance, I he seen aninterview linked to one student in our community took drugs for more than 3years.

[低频警示] one student in our community 在语料库中无此用法,疑似中式英语

[搭配统计] 动名搭配 take...drug 在教材中出现过 3272 次

[学习提示] 易混词汇: drug, medicine, medication, remedy, cure, chemical 都有“”之意。

1.19 In the interview, he said he wanted to take drugs because of a TV seriesabout it.

[名词错误] of a tv 冠词多余

[拼写错误] seriesabout 拼写错误,可替换选项为:series about, series-about, serest

[学习提示] 易混词汇: due to, owing to, because of, thanks to 均表示“由于”之意。

[批改提示] want的近义表达有intend/tend。

1.20 He was so sorry and regret that cried in the interview.

[低频警示] regret that cried 在语料库中无此用法,疑似中式英语

[批改提示] 注意cry和shout区别。

1.21 As you cansee, TV has such bad influences on children.

[拼写错误] cansee 拼写错误,可替换选项为:can see, can-see, canes

[低频警示] such bad influences on children 在语料库中无此用法,疑似中式英语

[搭配统计] 动名搭配 he...influence 在教材中出现过 3940 次

[词汇] bad在写作中使用的太泛,在某些语境下可考虑换为unforable/dreadful/be less impressive等。

1.22 Thus, this issue has caused wide publicconcern.

[拼写错误] publicconcern 拼写错误,可替换选项为:public concern, public-concern, publicans

[学习提示] 易混词汇: accordingly, consequently, hence, so, therefore, thus 均有“因此,所以”之意。

[批改提示] wide表示具体的宽度,广阔度,注意与widely区别。详情点击

[批改提示] cause近义表达有lead to/ result in/ bring about/ give rise to/ engender

1.23 In finalysis, we can draw the conclusion that TV affects us negatively both in mentallyand physically.

[拼写错误] mentallyand 拼写错误,可替换选项为:mentally and, mentally-and, mentality

[搭配统计] 动名搭配 draw...conclusion 在教材中出现过 2409 次

[批改提示] 注意draw和paint区别。

1.24 We should spare no effort to endeor in TV problem.

[搭配统计] 动名搭配 spare...effort 在教材中出现过 165 次

[学习提示] 易混词汇: effort, trouble, pains, endeour, struggle 均表示“努力”之意。

[高分句型] Spare no effort to意思是不遗余力...,是经典句型。

1.25 Considering the common phenomenon, I strongly agreat TV brings us some negative effects.

[低频警示] considering the common phenomenon 在语料库中无此用法,疑似中式英语

[搭配统计] 动名搭配 consider...phenomenon 在教材中出现过 10 次

[学习提示] 易混词汇: common, ordinary, commonplace, general, usual, popular, universal 均含有“普通的,普遍的”之意。

满意请采纳,希望对你有帮助,并祝你学习进步,(^__^)

可以点击这个网页

In contemporary society, the issue of what can TV brings to children touches off a flurry of controversy and debate. As well know, no invention has received more praise and abuse than TV. Some iled that TV can bring children not only some specific things like knowledge, but also some specific things such as happy, itiveness. While some frown at it,claiming that TV is a thing affects people negatively. On the balance, my forites to the latter with the reasons I will detail below. Firstly, it does harm to our eyes. According to a recent survey, 70%children get shortsightedness per year. Not hard to imagine that the major cause linked to TV.A scientific research has proved that watching TV 2hours a day will lead to shortsightedness in 6months. Take my brother for example. Tom, a 10-year-old boy, needs to wear glasses this year.Although it is hard to imagine that he spends more that 3 hours on his cartoons , I bet many kids he the same behior as him. invited of the seriousness of this problem, effective measures should be taken before things get worse. I think teachers are suped to encourage students to reading more books, because reading books in a proper way will not do harm to our eyes.Secondly,we cannot oid kids watching TV series or movies that concludes violence. A psychologist indicates that the violent contents in the TVs are a majorityreason linked to ager crimination. It is not difficult for us to find some agers fight with others or drug in news. For instance, I he seen an interview linked to one student in our community took drugs for more than 3years. In the interview, he said he wanted to take drugs because of a TV series about it. He was so sorry and regret that cried in the interview. As you case , TV has such bad influences on children. Thus, this issue has causeda wide public concern .In final ysis , we can draw the conclusion that TV affects us negatively both in mentally and physically. We should spare no effort to endeor in TV problem. Considering the common phenomenon, I strongly agree that TV brings us some negative effects.

paint,draw, painting 和art的区别

他正在用油画颜料画画。

paint, draw都是paint动词,有画画的意思,paint 更注重用画笔的,如油画之类的。draw 范围广点,painting是名词了,就是一副作品,art也是名词,不光是画,范围更广,是艺术,所以那些雕塑啊,音乐啊,是综合体吧。

pictures/paintings

drawing,picture,paint!有什么区别

OnDraw(&dc); //调用了OnDraw

draw指一般的画画,也可以说draw a picture,picture指的意思,也可以是照片的意思。[学习提示] 易混词汇: effective, efficient 均有“有效的”之意。paint一般指刷墙的意思。例如,paint the wall。

[学习提示] 易混词汇: inquiry, investigation, research, survey 均有“调查”之意。

区别不大 可以通用

drow 和 paint 有什么不同

[拼写错误] agreat 拼写错误,可替换选项为:agree that, agree-that, Agra

paint,draw

paint指用颜色画,如油画颜料、水彩或者水墨画,而draw

通常指用铅笔、钢笔或者粉笔画,后者一般并不涂上颜料。两动词的相应名词分别为painting和drawing

an

art

student

of

pictures.

我是学美术的学生,我画许多画。

5、想象一下,窗口显示的内容和打印的内容是不多的,所以,一般情况下,统一由OnDraw来画。窗口前景需要刷新时,系统会会调用到OnPaint,而OnPaint一般情况下是对DC作一些初始化作后,调用OnDraw()。He

iands

painting

in

oils.

注:paint的引伸含义是“描述”

He

is

not

so

black

as

he

is

painted.

他并不象人们所说的那么坏。

She

draws

very

她画得很好。

These

pictures

are

by

children.

这些画是孩子们画的。

注:drawing除了“图画”外,还有“工程图”的意思。

an

engineering

drawing

Vc++中Ondraw和OnPaint有什么区别?

void CView::OnPaint() //见VIEWCORE.CPP

分类: 电脑/网络 >> 程序设计 >> 其他编程语言

解析:

前者是可以响应WM_PAINT消息,后者是专门的响应WM_PAINT的消息映射函数,前者是在view中作画图的函数。但是最终的功能都是o[拼写错误] finalysis 拼写错误,可替换选项为:final ysis, final-ysis, Finland'snPaint实现的,因为OnDraw也是OnPaint函数调用的。 函数原形如下:

OnPaint()

{ CPaintD1、区别:OnDraw是一个纯虚函数,定义为virtual void OnDraw( CDC pDC ) = 0;而OnPaint是一个消息响应函数,它响应了WM_PANIT消息,也是是窗口重绘消息。C dc(this);

OnPreapareDC(&dc);

OnDarw(&dc);

}

draw 和 paint表示 画 的时候的区别?

[教师点评]

paint偏向于涂抹,油画,油漆,粉刷以及有色彩的画

色彩装饰

draw偏向于描绘轮廓,线条,制图一类

Let's hire a painter to paint this room.

让我们请一个油漆匠来粉刷这个房间。

I like to colour, paint and draw.

Enthusiasts proceeded to d[低频警示] movies that concludes violence 在语料库中无此用法,疑似中式英语raw thousands of images, many of them offensive.

爱好者绘制了数千幅漫画,许多是带有攻击性的。

Koza's mod can evolve the equations that would draw that particular picture.

柯扎的方法就可以演化出能画出那一特定图像的方程。

有例句可以看出:draw出来的东西具有实用性,比如graph

paint出来的往往是指艺术作品或者油漆画

画画的英语ing形式

Ipaint

pawell.int- painting

祝你学习进步,更上一层楼! (1. 首先:我们先要明确CView类派生自CWnd类。而OnPaint()是CWnd的类成员,同时负责响应WM_PAINT消息。OnDraw()是CVIEW的成员函数,并且没有响应消息的功能。这就是为什么你用VC生成的程序代码时,在视图类只有OnDraw没有OnPaint的原因。而在基于对话框的程序中,只有OnPaint。^__^)

不明白的再问哟,请及时采纳,多谢

1.直接加ing

2.以e结尾,且e不发音的,去e,加ing

3.重读闭音节,要双写尾字母,再加ing,你现阶段学的有swimming running beginning shopping jogging spitting sitting getting cutting

painting

汉语意思一样的英语单词的区别 请高手解答 谢谢额

(3)当视图变得无效时(包括大小的改变,移动,被遮盖等等),Windows发送WM_PAINT消息。该视图的OnPaint 处理函数通过创建CPaintDC类的DC对象来响应该消息并调用视图的OnDraw成员函数.OnPaint也要调用OnDraw,因此一般在OnDraw函数中进行绘制。

1. draw 通常指用铅笔、钢笔或者粉笔画,一般不涂上颜料; 而paint指用颜色画,如油画颜料、水彩或者水墨画;

绘画;

2. partner 是合伙人,伙伴,配偶的意思;而company是伙伴关系,同伴,陪伴(4)The WM_PAINT message is sent when the UpdateWindow or RedrawWindow member function is called.的意思;

3. district 侧重于讲区域的功能如商业区business district, 住宅区之类的;area侧重于讲面积;

4. tour 着重指旅行线路比较曲折,常表示“(周游各地的)参观、访问、(巡回)旅游、视察、购物、演出”等意思。visit作“参观,访问”时常是提前好的,具有一定的正式性。

5. station指的是总站,比如汽车总站bus station, 火车站train station. 而stop 一般指的是小站,bus stop指汽车停靠的站。

6. study带有研究性质的学习,learn是说学会。

7.madam多用于正式的场合,lady多用于日常生活,指一个你不知道名字的女性,适用于任何女性

8. 两词都是副词表示程度,“相当”或“颇”. quite的语气相对弱一些,pretty 语气强一些。

英语画的单词怎么读?

看的头就晕了,有没有简短一些的?

画画英文paint或draw.

1.13 Inview of the seriousness of this problem, effective measures should be taken beforings get worse.

英[pe?nt]

美[pent]

n.

颜料涂料;

绘拖拉;画作品;

胭脂等化妆品;

vt.

涂色于;

(用语言文字等)描写;

擦脂粉等

vi.

描绘;

化妆;

draw

美[dr?]

vt.&

vi.

招致;

吸引

vt.

画;

拉;

吸引;

vi.

移;

拔剑;

皱缩;

汲取

n.

平局;

抽奖;

内容供参考望采纳

MFC中的Invalidate、OnDraw、OnPaint函数的作用、区别和联系?

Invalidate()只是一个方法,就是立即更新显示的意思。

跟UpdateData()使用方法类似。

在需要更新显示的位置加Invalidate()[教师点评];就行了~~

当没有添加WM_PAINT消息处理时,窗口重绘时,由OnDraw来进行消息响应...

当添加WMOnPaint是WM_PAINT消息的消息处理函数,在OnPaint中调用OnDraw,一般来说,用户自己的绘图代码应放在OnDraw中。_PAINT消息处理时,窗口重绘时,WM_-----------------------------------------------------------PAINT消息被投递,由OnPaint来进行消息响应.这时就不能隐式调用OnDraw了.必须显式调用( CDC pDC=GetDC(); OnDraw(pDC); )..

隐式调用:当由OnPaint来进行消息响应时,系统自动调用CView::OnDraw(&pDC).

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 12345678@qq.com 举报,一经查实,本站将立刻删除。

联系我们

工作日:9:30-18:30,节假日休息