几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】odamfcapp and m-pdevice-update (http://www.dimcax.com/hust/showthread.php?t=17395)

yang686526 2009-05-06 06:55 PM

【转帖】odamfcapp and m-pdevice-update
 
odamfcapp and m_pdevice->update
odamfcapp and m_pdevice->update
in the odamfcapp sample, a secondary thread is used to update the view. in the seconadry thread, the method cdwgviewer:: paint() calls m_pdevice->update(). i noticed that when handling the mouse wheel and zooming in or out, the call to m_pdevice->update() appears to return before the view is completely rendered. i know cdwgviewer::abortregen is posting a wm_close to the secondary thread to abort it, but i don't see how this causes m_pdevice->update to return prematurely. every time i call update() from my own code, it blocks until the rendering is completed.
why is the call to m_pdevice->update() in the odamfcapp sample returning before the view is completely rendered?
hi,
independently of that how many threads to use, update() implementation calls odgicontext::regenabort() in its internal circles to determine if user want to abort regeneration. in odamfcapp, cdwgviewer is a descendant of odgicontext and regenabort() is overridden (see cdwgviewer::regenabort()/dwgviewer.cpp, line 291).
thanks, i didn't realize regenabort() was virtual. now it makes perfect sense.


所有的时间均为北京时间。 现在的时间是 08:06 PM.