Forum Moderators: open

Message Too Old, No Replies

instant rendering in MSHTML?

         

manju2

6:33 am on Dec 4, 2004 (gmt 0)



Hi,

I am using MSHTML as an edit view in my application and I use IHTML interfaces to programmatically output text in that view.
For e.g. I use the following functions

IHTMLDocument2::createElement(...)
IHTMLElement::put_innerText(...)

Please observe the following pseudo code

for(i=0 to 100)
create <p> elements with some text

The problem is that the output view (MSHTML edit view) displays the 100 <p> elements only after the loop completes 100 times and not every time the element is created. This way the output view will be blank till the loop terminates. Is there a way to immediately let the browser display (in the output view) elements immediately after creation?

Thanks,
manju

BlobFisk

10:29 am on Dec 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, manju2!

I must admit that I have never used either IHTML or MSHTML but what you are describing sounds like it could be an error in the way you've written your code. Are you opening and closing the loop correctly?

Iguana

1:06 pm on Dec 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



it sounds like you're not giving the viewing window any time to actually render the page. In VB terms you would need a 'Do Events' within the element creation for loop