From: Matt Benic on
Hi all. I have an application in which I have progammatically added a
CHtmlEditCtrl to a dialog. The control displays correctly, and i can
type text into it at runtime and retrieve the correct value with
GetDocumentHtml, however I can't seem to set the contents of the control
with SetDocumentHTML. The method returns successfully, and GetLastError
returns, so there are no obvious issues. I have tried a couple of tricks
to force an update, but nothing seems to work. The control seems to be
ignoring the text completelt, since calling GetDocumentHTML immediately
after SetDocumentHtml returns an empty HTML document.
Has anayone got this to work before?
Thanks,
Matt
From: jiangsheng[MVP] on
I believe this method relies on the HTMLDocument object, which is not ready
for read/write before the DocumentComeplte event is fired
"Matt Benic" <matt.benic@.removetomailme.5dt.com> ????
news:%23QNgFI1RGHA.196(a)TK2MSFTNGP10.phx.gbl...
> Hi all. I have an application in which I have progammatically added a
> CHtmlEditCtrl to a dialog. The control displays correctly, and i can
> type text into it at runtime and retrieve the correct value with
> GetDocumentHtml, however I can't seem to set the contents of the control
> with SetDocumentHTML. The method returns successfully, and GetLastError
> returns, so there are no obvious issues. I have tried a couple of tricks
> to force an update, but nothing seems to work. The control seems to be
> ignoring the text completelt, since calling GetDocumentHTML immediately
> after SetDocumentHtml returns an empty HTML document.
> Has anayone got this to work before?
> Thanks,
> Matt