Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dhtml editor
#17
this could be it ?

IHTMLDocument2::write Method
http://msdn.microsoft.com/workshop/brow ... /write.asp[/code]

Code:
Copy      Help
Writes one or more HTML expressions to a document in the specified window.

Syntax

    HRESULT write(      
        SAFEARRAY *psarray
    );

Parameters

    psarray
        [in] BSTRthat specifies the text and HTML tags to write.

Return Value

    Returns S_OK if successful, or an error value otherwise.

Example

    This example shows how to write a string to the document.

        IHTMLDocument2 *document; // Declared earlier in the code
        HRESULT hresult = S_OK;
        VARIANT *param;
        SAFEARRAY *sfArray;
        BSTR bstr = SysAllocString(OLESTR("Written by IHTMLDocument2::write()."));

        // Creates a new one-dimensional array
        sfArray = SafeArrayCreateVector(VT_VARIANT, 0, 1);
        
        if (sfArray == NULL || document == NULL) {
            goto cleanup;
        }

        hresult = SafeArrayAccessData(sfArray,(LPVOID*) & param);
        param->vt = VT_BSTR;
        param->bstrVal = bstr;
        hresult = SafeArrayUnaccessData(sfArray);
        hresult = document->write(sfArray);

    cleanup:
        SysFreeString(bstr);
        if (sfArray != NULL) {
            SafeArrayDestroy(sfArray);
        }
pi


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)