render - DrawToDC fails on IE9 web browser control -
i have been using following code metafile vector image content of iwebbrowser2 control following:
ihtmlelement* pdocbody;
ihtmldocument2* pdoc;
... ...
pdoc->get_body(&pdocbody); // body element ihtmldocument2
pdocbody->get_parentelement(&peleparent); peleparent->queryinterface(iid_ihtmlelement2,(void**)&prenderele2); // element render from
prenderele2->queryinterface(iid_ihtmlelementrender,(void**)&prender); // render interface
hdc hmetadc=::createenhmetafile(hrefdc,pictfile,&metarect,null); // dc
hr = prender->drawtodc(hmetadc);
the code above had worked beautifully ie6, ie7, ie8 provide vector image browser content. drawtodc call above fails beta release of ie9 (testing on windows 7, 32 bit) error code: 0x8007000e .
i have tried use wm_print , other draw methods able bitmap image, not vector image.
any idea why drawtodc fail ie9 in code above, , if there other method of getting vector image ie9.
thanks, subhash
thanks, afraid might case. know if there method available switch ie9 rendering gdi mode temporarily. expect reduce rendering quality/efficiency, should able live in current application.
this guess. ie9 touts faster rendering through hardware acceleration. suspect they're bypassing gdi , using more direct new directwrite and/or direct2d apis. metafiles serialization of gdi calls. without gdi calls, there's not capture there. may out of luck. :-(
Comments
Post a Comment