CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VC/MFC >  基础类

对话框上有一个静态文本控件,我调用该控件的OnPaint(),这个函数会不会调用对话框的OnPaint()

楼主soarfeihigh(ss)2002-04-23 12:22:54 在 VC/MFC / 基础类 提问

谢谢 问题点数:50、回复次数:2Top

1 楼liu_feng_fly(笑看风云 搏击苍穹 衔日月)回复于 2002-04-23 12:26:29 得分 40

onpaint()函数是不应该自己调用的,需要重画,可以调用  
  invalidate()函数  
  CWnd::Invalidate  
  void   Invalidate(   BOOL   bErase   =   TRUE   );  
   
  Parameters  
   
  bErase  
   
  Specifies   whether   the   background   within   the   update   region   is   to   be   erased.  
   
  Remarks  
   
  Invalidates   the   entire   client   area   of   CWnd.   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.  
   
  Top

2 楼alexzhou(你的明天会怎样)回复于 2002-04-23 12:32:25 得分 10

updateWindow   发送WM_PAINT   消息Top

相关问题

  • 对话框在什么情况下调用OnPaint()函数,越多越好。
  • 100分立给,超简单,对话框窗口的OnPaint函数调用
  • 急:关于对话框的OnPaint()函数
  • 如何调用对话框的成员函数而不显示对话框。
  • 如何在其它对话框中调用某对话框的OnEraseBkgnd()函数?
  • 紧急求助:如何调用父对话框的函数
  • 如何在自己定义的函数中调用对话框?
  • 对话框在initDialog()后,还自动调用其它函数吗?
  • vc 对话框窗口中调用函数的问题
  • 关于调用通用对话框的问题(FindText函数)

关键词

  • 函数
  • 调用
  • onpaint
  • berase
  • erased
  • region
  • background
  • area
  • paint message
  • wm

得分解答快速导航

  • 帖主:soarfeihigh
  • liu_feng_fly
  • alexzhou

相关链接

  • Visual C++类图书
  • Visual C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo