Click here to Skip to main content
15,919,341 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Windows security (how to retreive the name of a security group using vc6) Pin
David Crow16-Mar-05 2:50
David Crow16-Mar-05 2:50 
Generaltray icon notifycation problem Pin
ThinkingPrometheus15-Mar-05 3:52
ThinkingPrometheus15-Mar-05 3:52 
GeneralRe: tray icon notifycation problem Pin
ThinkingPrometheus15-Mar-05 5:02
ThinkingPrometheus15-Mar-05 5:02 
Generalmultilanguge support for reading ini file Pin
inbakumar.G15-Mar-05 3:48
inbakumar.G15-Mar-05 3:48 
Generali need netcons.h Pin
Sébastien Nadeau15-Mar-05 3:48
Sébastien Nadeau15-Mar-05 3:48 
GeneralRe: i need netcons.h Pin
David Crow15-Mar-05 5:55
David Crow15-Mar-05 5:55 
GeneralVC ++ desktop service based on SOAP Pin
ashutosh_tripathi15-Mar-05 3:15
ashutosh_tripathi15-Mar-05 3:15 
GeneralCDHtmlDialog problem Pin
ewanb15-Mar-05 2:34
ewanb15-Mar-05 2:34 
Hi,

I have a CDHtmlDialog derived class that is causing me a problem. Every 3rd time I create an instance and call DoModal() I get an access violation occuring inside the CDHtmlDialog::OnInitDialog method and it is being caused by the m_wndBrowser member being NULL.

The problem occurs in this part of the method:

if (m_pBrowserApp == NULL)<br />
{<br />
	// create the control window<br />
	m_wndBrowser.CreateControl(CLSID_WebBrowser, NULL, WS_VISIBLE | WS_CHILD,<br />
					rectClient, this, AFX_IDC_BROWSER);<br />
	lpUnk = m_wndBrowser.GetControlUnknown();<br />
	if (FAILED(lpUnk->QueryInterface(IID_IWebBrowser2, (void**) &m_pBrowserApp)))<br />
	{<br />
		m_wndBrowser.DestroyWindow();<br />
		DestroyWindow();<br />
		return TRUE;<br />
	}<br />
}


The call to m_wndBrowser.CreateControl() fails causing the m_wndBrowser to be set to NULL.

I tried reusing one instance of my class and repeatedly calling DoModal() on the same object and the same thing happened. Can anyone suggest what might cause the create call to fail after two previous successful calls?

All help appreciated because this has been bugging me for a while now.
Thanks,
Ewan
GeneralRe: CDHtmlDialog problem Pin
Blake Miller15-Mar-05 12:51
Blake Miller15-Mar-05 12:51 
GeneralRe: CDHtmlDialog problem Pin
ewanb16-Mar-05 2:05
ewanb16-Mar-05 2:05 
GeneralRe: CDHtmlDialog problem Pin
Blake Miller16-Mar-05 11:35
Blake Miller16-Mar-05 11:35 
GeneralRe: CDHtmlDialog problem Pin
Ed K6-Sep-05 10:28
Ed K6-Sep-05 10:28 
GeneralDirect X &amp; DVD Pin
AJ12315-Mar-05 2:23
AJ12315-Mar-05 2:23 
GeneralCOM Events: reference values Pin
peterchen15-Mar-05 1:48
peterchen15-Mar-05 1:48 
GeneralBSTR TO STRING Pin
sunit515-Mar-05 1:45
sunit515-Mar-05 1:45 
GeneralRe: BSTR TO STRING Pin
ThatsAlok15-Mar-05 2:14
ThatsAlok15-Mar-05 2:14 
GeneralRe: BSTR TO STRING Pin
sunit515-Mar-05 2:41
sunit515-Mar-05 2:41 
GeneralRe: BSTR TO STRING Pin
ThatsAlok15-Mar-05 2:59
ThatsAlok15-Mar-05 2:59 
GeneralRe: BSTR TO STRING Pin
Ravi Bhavnani15-Mar-05 3:34
professionalRavi Bhavnani15-Mar-05 3:34 
GeneralRe: BSTR TO STRING Pin
includeh1015-Mar-05 8:25
includeh1015-Mar-05 8:25 
GeneralProblem in Copying a data / image to a ClipBoard Pin
zahid_ash15-Mar-05 1:44
zahid_ash15-Mar-05 1:44 
GeneralRe: Problem in Copying a data / image to a ClipBoard Pin
David Crow15-Mar-05 2:33
David Crow15-Mar-05 2:33 
GeneralRe: Problem in Copying a data / image to a ClipBoard Pin
zahid_ash15-Mar-05 2:49
zahid_ash15-Mar-05 2:49 
GeneralRe: Problem in Copying a data / image to a ClipBoard Pin
David Crow15-Mar-05 2:58
David Crow15-Mar-05 2:58 
GeneralRe: Problem in Copying a data / image to a ClipBoard Pin
zahid_ash15-Mar-05 3:06
zahid_ash15-Mar-05 3:06 

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.