Click here to Skip to main content
15,904,823 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralChild Dialog and the XP visual styles Pin
Chad Busche13-Dec-02 11:32
Chad Busche13-Dec-02 11:32 
GeneralWTL Community Pin
Michael P Butler13-Dec-02 2:07
Michael P Butler13-Dec-02 2:07 
GeneralRe: WTL Community Pin
Paul Selormey13-Dec-02 2:24
Paul Selormey13-Dec-02 2:24 
GeneralRe: WTL Community Pin
Ramon Casellas13-Dec-02 2:54
Ramon Casellas13-Dec-02 2:54 
GeneralRe: WTL Community Pin
AlexO19-Dec-02 5:08
AlexO19-Dec-02 5:08 
GeneralUsing CComPtr<IHTMLDocument2Ptr>? (first time in ATL...) Pin
Joan M13-Dec-02 0:10
professionalJoan M13-Dec-02 0:10 
GeneralRe: Using CComPtr? (first time in ATL...) Pin
Paul M Watt13-Dec-02 5:20
mentorPaul M Watt13-Dec-02 5:20 
GeneralRe: Using CComPtr? (first time in ATL...) Pin
Joan M13-Dec-02 5:37
professionalJoan M13-Dec-02 5:37 
Thank you very much for your reply!

I'd solved the problem doing what you've suggested...

But I'm still having one problem:

CComQIPtr<IHTMLDocument2> spHTMLDocument = this->m_HTMLCtrl.GetHtmlDocument();
if(spHTMLDocument)
{
    CComQIPtr<IHTMLElement> spHTML;

    spHTMLDocument->get_body(&spHTML);

    if (spHTML)
    {
        bstr = csCodiHTML.AllocSysString();

        spHTML->put_innerHTML(bstr);

        spHTML.Release();
    }
    else
    {
        //spHTMLDocument->write(); <code>what I'm trying now...</code>
        //bstr = csCodiHTML.AllocSysString();
        //spHTMLDocument->createElement(bstr,&spHTML); <code>THIS DON'T MAKES ANYTHING...</code>
    }


OK, as you can see In the else clause I'm trying to write the HTML directly to the document. This is interesting for me because for some reason the first time that I try to get access to the document it's a null pointer... (all the other times it works fine).

Moreover if I can do it I'll avoid the usage of the second pointer making the code easier...

The only problem (I expect) is that I need to use a SAFEARRAY type in order to write directly to the document pointer and I don't know how to do it...

I've searched into the MSDN but there are not examples...

Thank you for your help!
GeneralRe: Using CComPtr? (first time in ATL...) Pin
AlexO19-Dec-02 3:23
AlexO19-Dec-02 3:23 
GeneralRe: Using CComPtr? (first time in ATL...) Pin
Joan M19-Dec-02 3:44
professionalJoan M19-Dec-02 3:44 
Generallist of VARIANT Pin
bojinyu12-Dec-02 2:31
bojinyu12-Dec-02 2:31 
GeneralRe: list of VARIANT Pin
Daniel Strigl12-Dec-02 2:49
Daniel Strigl12-Dec-02 2:49 
GeneralRe: list of VARIANT Pin
bojinyu12-Dec-02 3:22
bojinyu12-Dec-02 3:22 
GeneralRe: list of VARIANT Pin
Daniel Strigl12-Dec-02 4:30
Daniel Strigl12-Dec-02 4:30 
GeneralRe: list of VARIANT Pin
bojinyu12-Dec-02 18:07
bojinyu12-Dec-02 18:07 
GeneralRe: list of VARIANT Pin
bojinyu12-Dec-02 3:22
bojinyu12-Dec-02 3:22 
QuestionSTL Tree ? Pin
Nick Parker11-Dec-02 7:28
protectorNick Parker11-Dec-02 7:28 
AnswerRe: STL Tree ? Pin
Neville Franks11-Dec-02 9:25
Neville Franks11-Dec-02 9:25 
GeneralRe: STL Tree ? Pin
Nick Parker11-Dec-02 9:37
protectorNick Parker11-Dec-02 9:37 
GeneralRe: STL Tree ? Pin
Todd Smith12-Dec-02 11:36
Todd Smith12-Dec-02 11:36 
AnswerRe: STL Tree ? Pin
Paul M Watt13-Dec-02 5:26
mentorPaul M Watt13-Dec-02 5:26 
AnswerRe: STL Tree ? Pin
Jörgen Sigvardsson14-Dec-02 10:57
Jörgen Sigvardsson14-Dec-02 10:57 
QuestionHow do I raise events. Pin
acosmin11-Dec-02 3:15
acosmin11-Dec-02 3:15 
AnswerRe: How do I raise events. Pin
xi90412-Dec-02 2:07
xi90412-Dec-02 2:07 
GeneralSetSite Pin
suresh_sathya11-Dec-02 1:09
suresh_sathya11-Dec-02 1:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.