查看单个帖子
旧 2009-05-07, 07:19 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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:nviewsetactivelayout() after line:
code:
m_pdb->setcurrentlayout(odstring(dlg.m_snewlayoutname));
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)