![]() |
【转帖】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. |