![]() |
【转帖】why Cant I Get The Preview Bitmap
why can't i get the preview bitmap?
why can't i get the preview bitmap? the following is my code : //////////////////////////////////////////////////////////////////////////// void cpreviewdib::setpreviewfile(lpctstr lpfilename) { cstring csfilename(lpfilename); m_odimage.bmp.clear(); m_odimage.header.clear(); m_odimage.wmf.clear(); if ( ! csfilename.getlength() ) return; cstring ext = csfilename.right(4); ext.makelower(); if ( ext == ".dwg" || ext == ".dxf" ) { odstreambufptr pfile; odstaticrxobject<myservices> svcs; svcs.disableoutput(false);//true or false?//1 odinitialize(&svcs); pfile =svcs.createfile(lpfilename); try { oddbgetpreviewbitmap(pfile, &m_odimage); } catch(...) { return; } } } //////////////////////////////////////////////////////////////////////////////////fff">undefined the result is that m_odimage.hasbmp() ==false. this function will return the preview only if it exists in the file. but saving preview to dwg or dxf is optional. sergey slezkin |
所有的时间均为北京时间。 现在的时间是 04:27 PM. |