英语差的都见不得人,拜托达人帮忙译下

unhappyless_06 2006-08-23 12:47:28
MFC Library Reference
CWnd::Invalidate



Remarks
The client area is marked for painting when the next WM_PAINT message occurs. The region can also be validated before a WM_PAINT message occurs by the ValidateRect or ValidateRgn member function.

The bErase parameter specifies whether the background within the update area is to be erased when the update region is processed. If bErase is TRUE, the background is erased when the BeginPaint member function is called; if bErase is FALSE, the background remains unchanged. If bErase is TRUE for any part of the update region, the background in the entire region, not just in the given part, is erased.

Windows sends a WM_PAINT message whenever the CWnd update region is not empty and there are no other messages in the application queue for that window.
...全文
411 16 打赏 收藏 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
unhappyless_06 2006-08-27
  • 打赏
  • 举报
回复
是不是窗口内容一无效,就会自动刷新?
bobob 2006-08-26
  • 打赏
  • 举报
回复
unhappyless_06() ( ) 信誉:100 Blog 2006-08-26 18:26:00 得分: 0


那窗口无效时,还能接受 WM_PAINT 消息?


==========>
无效是指显示的内容无效,需要刷新,而不是窗口句柄无效
sizhuagou 2006-08-26
  • 打赏
  • 举报
回复
InvalidateRect()后可以马上UpdateWindow()
unhappyless_06 2006-08-26
  • 打赏
  • 举报
回复
那窗口无效时,还能接受 WM_PAINT 消息?
ok1234567 2006-08-26
  • 打赏
  • 举报
回复
Invalidate() 使客户区标记为无效,含义是:需要重新绘制,该区域的对象暂时不可用,但是不一定立即绘制,如果在消息队列没有其他消息、且窗口有效的时候,才会发(send)重新绘制(WM_PAINT )消息,这样处理的好处是:如果有多个WM_PAINT 事件,可以合并执行,另外,重新绘制事件相比于程序的其它事件,通常不是那么迫切。
如果需要立即更新客户区,可以直接SendMessage,而不是Invalidate,比如动画效果什么的
菜牛 2006-08-26
  • 打赏
  • 举报
回复
无效!=重绘

只有当“更新区域不为空,并且没有其他的消息在线程队列中,Windows(才)发送WM_PAINT消息”
unhappyless_06 2006-08-26
  • 打赏
  • 举报
回复
Invalidate() 不是使窗口无效的意思吗? 无效==重绘?
xiaoshi0 2006-08-23
  • 打赏
  • 举报
回复
Windows sends a WM_PAINT message whenever the CWnd update region is not empty and there are no other messages in the application queue for that window.

只要CWnd中的更新区域不为空,并且没有其他的消息在线程队列中,Windows发送WM_PAINT消息
xiaoshi0 2006-08-23
  • 打赏
  • 举报
回复
The bErase parameter specifies whether the background within the update area is to be erased when the update region is processed. If bErase is TRUE, the background is erased when the BeginPaint member function is called; if bErase is FALSE, the background remains unchanged. If bErase is TRUE for any part of the update region, the background in the entire region, not just in the given part, is erased.

bErase参数指定当重绘操作运行的时候,更新区域的背景是否需要擦除。如果bErase参数为TRUE,则当BeginPaint成员函数调用的时候背景被擦除;如果bErase参数为FALSE,剩余的背景色不变。如果bErase参数是TRUE,在背景色所在的任意需要重绘的区域,不光是你给定的区域,背景色所在的全部区域都要擦除。
m_nNightmire 2006-08-23
  • 打赏
  • 举报
回复
简单的说,使用CWnd::Invalidate方法就可以重绘窗口
aa3000 2006-08-23
  • 打赏
  • 举报
回复
更正一下楼上的。

备注:
当下一个WM_PAINT消息发生时,客户区被标记为重绘,这个区域也能通过 ValidateRect 或ValidateRgn 成员函数在WM_PAINT消息发生前使之有效。

参数 bErase 表示当更新区域已被处理时是否擦除更新区域内的背景。若 bErase 为TRUE,背景会在 BeginPaint 成员函数调用时被擦除;若 bErase 为 FALSE,背景保持不变。如果 bErase 对更新区域的所有部分均为 TRUE,那么整个区域的背景,不只是给定部分都会被擦除。

只要CWnd更新区域不为空,且此窗口所对应的应用程序队列无其他消息,Windows 就会发送一个WM_PAINT 消息。
xiaoshi0 2006-08-23
  • 打赏
  • 举报
回复
The client area is marked for painting when the next WM_PAINT message occurs. The region can also be validated before a WM_PAINT message occurs by the ValidateRect or ValidateRgn member function.

客户区被标记,当下一个WM_PAINT消息触发的时候重绘该区域。当在WM_PAINT消息触发之前调用ValidateRect或者ValidateRgn成员函数,也可以使这个区域重新生效。
  • 打赏
  • 举报
回复
如果不能借助翻译工具看明白的话,对技术提高和解决难点问题的确非常不利的.

而另一方面,目前对电脑技术的翻译工作,似乎缺少统一的管理.造成很大的浪费.
ggw 2006-08-23
  • 打赏
  • 举报
回复
瞎译一气:
备注:
当下一个WM_PAINT消息发生时,客户区被标记为重绘。这个(重绘)区域也能通过 ValidateRect 或ValidateRgn 成员函数,在WM_PAINT 消息发生前确定。
(意思是说,默认的是整个客户区,当然也可以自行通过那两个成员函数确定重绘区)

参数bErase 指定当更新区域已被处理时是否删除更新区域内的背景。若为TRUE,则当BeginPaint 函数被调用时,背景被擦除;而若为FALSE,则背景保持不变。如果对任何更新区域的部分皆为TRUE,则整个区域而非给定部分都被擦除。
只要CWnd更新区域不空,且此窗口所对应的应用程序队列无其他消息,Windows 就发送一个WM_PAINT 消息。
DentistryDoctor 2006-08-23
  • 打赏
  • 举报
回复
用词霸吧.
teacher1998 2006-08-23
  • 打赏
  • 举报
回复
当WM_PAINT 消息发生时,客户区便被绘制(当当WM_PAINT 消息被ValidateRect函数激活时同样有效)

...(中间这么多,烦)

只要CWnd为非空或没有其他的消息队列附加在当前程序,则windows会向它发送WM_PAINT消息。

这是什么api啊?

16,550

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Creator Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧