Click here to Skip to main content
16,021,288 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Message Box being hidden Pin
Ryan Binns26-Feb-06 17:19
Ryan Binns26-Feb-06 17:19 
GeneralRe: Message Box being hidden Pin
braveheartkenya27-Feb-06 7:21
braveheartkenya27-Feb-06 7:21 
GeneralRe: Message Box being hidden Pin
Nibu babu thomas26-Feb-06 18:27
Nibu babu thomas26-Feb-06 18:27 
GeneralRe: Message Box being hidden Pin
braveheartkenya27-Feb-06 7:25
braveheartkenya27-Feb-06 7:25 
QuestionHow to use LB_SETCOUNT message for MFC CListBox class? Pin
oleetron26-Feb-06 2:01
oleetron26-Feb-06 2:01 
AnswerRe: How to use LB_SETCOUNT message for MFC CListBox class? Pin
Ryan Binns26-Feb-06 17:20
Ryan Binns26-Feb-06 17:20 
AnswerRe: How to use LB_SETCOUNT message for MFC CListBox class? Pin
ashesh deep31-Aug-09 2:03
ashesh deep31-Aug-09 2:03 
QuestionProblem about IHTMLDocument2->wirte() , plz ! Pin
Leesen25-Feb-06 21:31
Leesen25-Feb-06 21:31 
I have written a program which reads data from internet and displays it in the web browser control.

And now I'm fuzz about such problems( I have paste the code at the end):
Sometimes the 'DisplayInExplore' works well, but Sometimes it crashs.

1. I have debugged it , and found that 'pHD->write(pSFArray);' method would result in the 'Assert Debug' fatal error. And I can't step into the method write.

2. Sometimes, the 'pHD->write(pSFArray);' could execute successfully, but there was no data to display in the Web Browser control. And when cursor went into the client area of the Web Browser control, the cursor change to the 'wait' status.

So , I have no idea why it works so instable ? Or there are some errors in my function?

Plz give me some suggestion ,Thx.

---------------------------------------------------------------------------
The code is as below:

void CGameInfoDlg::DisplayInExplore(CString strContent)
{
//m_exploreView is the CWebBrowser2

IHTMLDocument2* pHD=(IHTMLDocument2*) m_exploreView.GetDocument();
VARIANT* pVATable=NULL;
SAFEARRAY* pSFArray;
pSFArray = SafeArrayCreateVector(VT_VARIANT, 0, 1);
if(pSFArray!=NULL && pHD!=NULL)
{
SafeArrayAccessData(pSFArray,(LPVOID*) &pVATable);
BSTR bstrContent=strContent.AllocSysString();
pVATable->vt=VT_BSTR;
pVATable->bstrVal=bstrContent;
SafeArrayUnaccessData(pSFArray);
pHD->write(pSFArray);

}
else
{
MessageBox("Errors!");
}

SysFreeString(pVATable->bstrVal);
if(pSFArray!=NULL)
{
SafeArrayDestroy(pSFArray);
}

}

AnswerRe: Problem about IHTMLDocument2->wirte() , plz ! Pin
Leesen27-Feb-06 1:53
Leesen27-Feb-06 1:53 
Questionhard ware serial number Pin
ss200625-Feb-06 21:29
ss200625-Feb-06 21:29 
QuestionProgramming the Parallel Port Pin
kmaster25-Feb-06 21:12
kmaster25-Feb-06 21:12 
AnswerRe: Programming the Parallel Port Pin
Cool Ju26-Feb-06 0:53
Cool Ju26-Feb-06 0:53 
GeneralRe: Programming the Parallel Port Pin
normanS26-Feb-06 19:26
normanS26-Feb-06 19:26 
QuestionPrinting colors Pin
includeh1025-Feb-06 20:52
includeh1025-Feb-06 20:52 
Questionhardware monitor Pin
gr8coaster32925-Feb-06 13:45
gr8coaster32925-Feb-06 13:45 
AnswerRe: hardware monitor Pin
Hamid Taebi25-Feb-06 17:15
professionalHamid Taebi25-Feb-06 17:15 
QuestionRe: hardware monitor Pin
gr8coaster32926-Feb-06 15:07
gr8coaster32926-Feb-06 15:07 
AnswerRe: hardware monitor Pin
Hamid Taebi26-Feb-06 17:30
professionalHamid Taebi26-Feb-06 17:30 
QuestionCEdit Default focus Pin
j_sharan25-Feb-06 12:28
j_sharan25-Feb-06 12:28 
AnswerRe: CEdit Default focus Pin
Hamid Taebi25-Feb-06 17:07
professionalHamid Taebi25-Feb-06 17:07 
AnswerRe: CEdit Default focus Pin
FarPointer26-Feb-06 3:58
FarPointer26-Feb-06 3:58 
QuestionCDialog and Keyboard events Pin
braveheartkenya25-Feb-06 11:15
braveheartkenya25-Feb-06 11:15 
AnswerRe: CDialog and Keyboard events Pin
Hamid Taebi25-Feb-06 17:04
professionalHamid Taebi25-Feb-06 17:04 
GeneralRe: CDialog and Keyboard events Pin
braveheartkenya26-Feb-06 0:48
braveheartkenya26-Feb-06 0:48 
GeneralRe: CDialog and Keyboard events Pin
Hamid Taebi26-Feb-06 3:49
professionalHamid Taebi26-Feb-06 3:49 

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.