几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】winopengl Vectorizer Broken For Changing Active Layou (http://www.dimcax.com/hust/showthread.php?t=19162)

yang686526 2009-05-07 07:19 PM

【转帖】winopengl Vectorizer Broken For Changing Active Layou
 
winopengl vectorizer broken for changing active layout
winopengl vectorizer broken for changing active layout
hi,
i am not able to refresh the drawing when changing active layout using winopengl vecotrize device. to recreate the issue follow these steps:
1. open odamfcappdll.exe
2. create new drawing or open any existing drawing.
3. change vectorize device using vectorize->winopengl.gs menu item.
4. vectorize the drawing.
6. change active layout using view->set active layout... menu item.
the drawing doesn't refresh and can't draw any entity in drawing. sometimes it crashes the program too.
is this a bug in winopengl library or in the odamfcapp? how to fix it?
thanks.
hi,
it's limitation of odamfcapp sample that it does not reinitialize gs when layout is switched. and it's a bug that odamfcapp is crashed.
the easiest way to reinitialize gs is to recreate cdwgviewer. next lines do this:
code:
cframewnd* pframe = (cframewnd*)theapp.getmainwnd();
pframe = (cframewnd*)pframe->getactiveframe();
cview* pview = pframe->getactiveview();
if(pview->iskindof(&cdwgviewer::classcdwgviewer))
{
pframe->sendmessage(wm_close, 0, 0);
theapp.getmainwnd()->sendmessage(wm_command, makelong(id_vectorize,0), 0);
}
add them into codamfcappdoc::onviewsetactivelayout() after line:
code:
m_pdb->setcurrentlayout(odstring(dlg.m_snewlayoutname));


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