Click here to Skip to main content
15,903,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: XML string to DataTable Pin
lsugirljte4-May-06 6:29
lsugirljte4-May-06 6:29 
QuestionAppending text to a richedit Pin
KellyR4-May-06 6:05
KellyR4-May-06 6:05 
AnswerRe: Appending text to a richedit Pin
Justin Tay4-May-06 12:17
Justin Tay4-May-06 12:17 
Questionmonitoring print dialog box Pin
Atron4-May-06 4:58
Atron4-May-06 4:58 
QuestionThank you Pin
Charles Reese4-May-06 4:51
Charles Reese4-May-06 4:51 
AnswerRe: Thank you Pin
toxcct4-May-06 5:22
toxcct4-May-06 5:22 
GeneralRe: Thank you Pin
Eytukan4-May-06 6:12
Eytukan4-May-06 6:12 
QuestionUrgent: Trapping documentcomplete event in IE browser Pin
rana744-May-06 4:19
rana744-May-06 4:19 
We have an ATL application which hosts an IE browser.
We create the browser instance and subscribe to it as follows:

STDMETHODIMP CIEdispatcher::createIE(void)
{
// TODO: Add your implementation code here
HRESULT hr = E_FAIL;
if (m_spIE == NULL) // Can only start one instance of IE4
{
// Create an instance of IE4 and get the IWebBrowser2 interface pointer.
// IWebBrowser2 represents the application as well as the WebBrowser control.
hr = CoCreateInstance(CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER,//CLSCTX_INPROC_SERVER,//
IID_IWebBrowser2, (void**)&m_spIE);


if (SUCCEEDED(hr))
{
m_spIE->put_Visible(TRUE); // We want to see IE4 don't we???
cout<< " Registering for browser events " << endl;
AtlAdvise(m_spIE,GetUnknown(),DIID_DWebBrowserEvents2,&m_dwCookie);
CComVariant vurl(_T("http://www.yahoo.com"));
hr = m_spIE->Navigate2(&vurl, &ve, &ve, &ve, &ve);
}
return S_OK;
}

However the program exists before the documentcomplete is fired!!!So we try to capture the readystate property before returning from the method as follows:

READYSTATE result;


do
{
m_spIE->get_ReadyState (&result);

} while (result != READYSTATE_COMPLETE);

But even then the program exits before documentcomplete is fired.
However if we keep the program running indefinitely,documentcomplete is fired ,and we can load the document tree.

What should we do to prevent the program from exitting before documentcomplete is fired? We have also tried get_statustext as Done with no avail.
AnswerRe: Urgent: Trapping documentcomplete event in IE browser Pin
led mike4-May-06 7:52
led mike4-May-06 7:52 
AnswerRe: Urgent: Trapping documentcomplete event in IE browser Pin
Sheng Jiang 蒋晟4-May-06 15:10
Sheng Jiang 蒋晟4-May-06 15:10 
QuestionOle DB for OLAP Pin
Tarek Jabri4-May-06 4:13
Tarek Jabri4-May-06 4:13 
AnswerRe: Ole DB for OLAP Pin
Steve Echols4-May-06 20:03
Steve Echols4-May-06 20:03 
QuestionOle DB for OLAP Pin
Tarek Jabri4-May-06 4:11
Tarek Jabri4-May-06 4:11 
QuestionHow to keep image displayed in dialog box? Pin
houari_id4-May-06 3:55
houari_id4-May-06 3:55 
AnswerRe: How to keep image displayed in dialog box? Pin
Cedric Moonen4-May-06 4:13
Cedric Moonen4-May-06 4:13 
GeneralRe: How to keep image displayed in dialog box? Pin
houari_id5-May-06 8:22
houari_id5-May-06 8:22 
GeneralRe: How to keep image displayed in dialog box? Pin
Cedric Moonen5-May-06 21:53
Cedric Moonen5-May-06 21:53 
QuestionCheckbox with BITMAP Pin
Raja Bose C Leo4-May-06 3:30
Raja Bose C Leo4-May-06 3:30 
AnswerRe: Checkbox with BITMAP Pin
toxcct4-May-06 3:44
toxcct4-May-06 3:44 
GeneralRe: Checkbox with BITMAP Pin
Raja Bose C Leo4-May-06 20:48
Raja Bose C Leo4-May-06 20:48 
AnswerRe: Checkbox with BITMAP Pin
Hamid_RT4-May-06 3:48
Hamid_RT4-May-06 3:48 
AnswerRe: Checkbox with BITMAP Pin
Ravi Bhavnani4-May-06 12:19
professionalRavi Bhavnani4-May-06 12:19 
QuestionNewbie: Using a com object in VC 7.1 Pin
ebruinsma4-May-06 2:51
ebruinsma4-May-06 2:51 
AnswerRe: Newbie: Using a com object in VC 7.1 Pin
Cedric Moonen4-May-06 3:13
Cedric Moonen4-May-06 3:13 
GeneralRe: Newbie: Using a com object in VC 7.1 Pin
ebruinsma4-May-06 3:21
ebruinsma4-May-06 3:21 

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.