Click here to Skip to main content
15,923,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralImage size tracker problem Pin
chen23-Jul-02 2:02
chen23-Jul-02 2:02 
GeneralRe: Image size tracker problem Pin
chen23-Jul-02 2:13
chen23-Jul-02 2:13 
GeneralI'm a beginner,who can explain the VARIANT STRUCT to me? Thanx! Pin
glinda23-Jul-02 1:41
glinda23-Jul-02 1:41 
GeneralRe: I'm a beginner,who can explain the VARIANT STRUCT to me? Thanx! Pin
Navin23-Jul-02 2:23
Navin23-Jul-02 2:23 
GeneralRe: I'm a beginner,who can explain the VARIANT STRUCT to me? Thanx! Pin
glinda23-Jul-02 16:25
glinda23-Jul-02 16:25 
GeneralRe: I'm a beginner,who can explain the VARIANT STRUCT to me? Thanx! Pin
Le centriste23-Jul-02 3:39
Le centriste23-Jul-02 3:39 
GeneralStandard checkbox and radio images Pin
Aggtaa23-Jul-02 1:16
Aggtaa23-Jul-02 1:16 
GeneralPuzzling OnInitialUpdate() behavior for CHtmlView derived class Pin
Nish Nishant23-Jul-02 1:15
sitebuilderNish Nishant23-Jul-02 1:15 
Here is my code :-

void CReportView::OnInitialUpdate()
{
    Navigate2(_T("about:blank"),NULL,NULL);
     
    IHTMLDocument2 *pDoc=(IHTMLDocument2 *)GetHtmlDocument();        
    if(!pDoc)
    {        
        return;
    }    

    HRESULT hr;
    SAFEARRAY* psa = SafeArrayCreateVector(VT_VARIANT, 0, 1);
    VARIANT *param;    

    MessageBox("L"); // If I comment out this line it fails

    BSTR bsData = m_html.AllocSysString();
    hr =  SafeArrayAccessData(psa, (LPVOID*)&param);
    param->vt = VT_BSTR;
    param->bstrVal = bsData;
    hr = pDoc->write(psa);
    hr = pDoc->close();
    SysFreeString(bsData);
    SafeArrayDestroy(psa);        
}


You can see the MessageBox call there. If the MessageBox is there, it works right and shows the html rendering of the source contained in m_html which is a CString. If I remove the MessageBox, the html comes rightly for about 0.005 seconds [approximate guess] and then it becomes blank Frown | :-(

Regards
Nish


Author of the romantic comedy

Summer Love and Some more Cricket [New Win]

Review by Shog9
Click here for review[NW]

GeneralRe: Puzzling OnInitialUpdate() ... [work-around] Pin
Nish Nishant23-Jul-02 1:39
sitebuilderNish Nishant23-Jul-02 1:39 
GeneralRe: Puzzling OnInitialUpdate() behavior for CHtmlView derived class Pin
Gavin Jerman23-Jul-02 4:16
Gavin Jerman23-Jul-02 4:16 
GeneralRe: Puzzling OnInitialUpdate() behavior for CHtmlView derived class Pin
Nish Nishant23-Jul-02 6:38
sitebuilderNish Nishant23-Jul-02 6:38 
GeneralGetting the class In the class view. Pin
grshankar23-Jul-02 1:13
grshankar23-Jul-02 1:13 
GeneralRe: Getting the class In the class view. Pin
567890123423-Jul-02 3:51
567890123423-Jul-02 3:51 
GeneralNo don't Pin
Abin23-Jul-02 12:40
Abin23-Jul-02 12:40 
QuestionHow to implement Drag and drop Pin
Bhikshapathi Gorantla23-Jul-02 0:53
Bhikshapathi Gorantla23-Jul-02 0:53 
AnswerRe: How to implement Drag and drop Pin
cycosi23-Jul-02 2:45
cycosi23-Jul-02 2:45 
GeneralUpdating records in CArrayRowset Pin
User 2237023-Jul-02 0:52
User 2237023-Jul-02 0:52 
GeneralUsing UpdateResource() to change app's icon Pin
kb23-Jul-02 0:49
kb23-Jul-02 0:49 
QuestionHow To Code a Meter To Track the Amount of Data Sent/ Recd from some Internet Connection Pin
Vikrant Kapoor22-Jul-02 23:46
Vikrant Kapoor22-Jul-02 23:46 
GeneralCHtmlView::Create issue Pin
Nish Nishant22-Jul-02 23:40
sitebuilderNish Nishant22-Jul-02 23:40 
GeneralRe: CHtmlView::Create issue [more info] Pin
Nish Nishant22-Jul-02 23:43
sitebuilderNish Nishant22-Jul-02 23:43 
GeneralRe: CHtmlView::Create issue [more info] #2 Pin
Nish Nishant22-Jul-02 23:52
sitebuilderNish Nishant22-Jul-02 23:52 
GeneralRe: CHtmlView::Create issue [work-around] Pin
Nish Nishant23-Jul-02 0:26
sitebuilderNish Nishant23-Jul-02 0:26 
GeneralRe: CHtmlView::Create issue [work-around] Pin
Alexandru Savescu23-Jul-02 1:36
Alexandru Savescu23-Jul-02 1:36 
GeneralRe: CHtmlView::Create issue [work-around] Pin
Nish Nishant23-Jul-02 1:41
sitebuilderNish Nishant23-Jul-02 1:41 

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.