求翻译MSDN里的一段话!
是对OnPrePareDC函数的描述:
The default implementation of this function does nothing if the function is called for screen display. However, this function is overridden in derived classes, such as CScrollView, to adjust attributes of the device context; consequently, you should always call the base class implementation at the beginning of your override.
If the function is called for printing, the default implementation examines the page information stored in the pInfo parameter. If the length of the document has not been specified, OnPrepareDC assumes the document to be one page long and stops the print loop after one page has been printed. The function stops the print loop by setting the m_bContinuePrinting member of the structure to FALSE.
谢谢!!!!
问题点数:10、回复次数:5Top
1 楼baoyuhua(榕树)回复于 2004-09-04 13:24:16 得分 2
如果你不是在ondraw()函数中使用dc绘图的话,那么在其他地方使用时,在获得dc后一定要先调用这个函数,这样mfc可以在视图发生滚动后为你绘制的象素点坐标作转换,使其可以根基滚动位置作变换Top
2 楼summer6074(验尸官)回复于 2004-09-04 13:24:52 得分 8
先翻译一段,报了到再来第2段
当这个函数被调用进行屏幕显示时,这个函数的默认实现是什么都不做的.然而,这个函数一般在派生类中进行重载以用来调节设备环境的属性,cscrollview就是一例.因此,每次在你使用派生中这个函数的重载函数时,你都要首先调用这个函数的基类的实现.
Top
3 楼summer6074(验尸官)回复于 2004-09-04 13:33:29 得分 0
如果这个函数是用来做打印的话,它的默认实现版本会检查在pInfo这个参数中的保存的页面信息.如果打印文本的长度没有被标识,onpreparedc 就会默认它只有一页从而在打印完一页后旧会停下来(终止打印循环).而它终止循环的是通过设定结构体中成员m_bContinuePrinting 为false而达到这个目的的.Top
4 楼summer6074(验尸官)回复于 2004-09-04 13:34:01 得分 0
收工
Top
5 楼jyq686(四空)回复于 2004-09-05 09:25:12 得分 0
TO: summer6074(验尸官)
感谢到非常!!!还有 baoyuhua(游侠)Top




