几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】can viewupdate utilize a progressmeter (http://www.dimcax.com/hust/showthread.php?t=15343)

yang686526 2009-05-04 05:25 PM

【转帖】can viewupdate utilize a progressmeter
 
can view::update utilize a progressmeter
can view::update utilize a progressmeter
hi,
is there a way to receive progress calls (through an instance of oddbhostappprogressmeter) while updating a view? i've written an import filter based on the exvectorize example. after i open a dwg file, which calls and updates my progressmeter correctly, i call mybasedevice::update, which calls mybaseview::update, which draws everything in the document. for it usually takes more time to draw (import) a document then just to open it, i'd like to to have a progress bar for the update as well. does anybody know how to set the device or the view classes to utilize a progressmeter?
thanks
arno歵
i think there may be a need for a callback from gs lib for this.
well, i've had to solve this, so i overrode the update method where i first iterate through the current database to figure how many entities will be (probably) sent to draw. then, in draw method, i increment a counter and calculate the actual progress. of course i have to watch recursivity and that is sort of tricky. definitely not an exact science. therefore i would appreciate if i could assign a progress meter either to my context or view.
arno歵


所有的时间均为北京时间。 现在的时间是 03:46 AM.