Click here to Skip to main content
16,005,316 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to open Internet Explorer on click of a menu item in a dialog based mfc app Pin
GauranG Shah16-Sep-07 21:24
GauranG Shah16-Sep-07 21:24 
GeneralRe: how to open Internet Explorer on click of a menu item in a dialog based mfc app Pin
Iain Clarke, Warrior Programmer17-Sep-07 2:55
Iain Clarke, Warrior Programmer17-Sep-07 2:55 
Questionstruct definition Pin
Waldermort16-Sep-07 20:03
Waldermort16-Sep-07 20:03 
AnswerRe: struct definition Pin
Michael Dunn16-Sep-07 20:20
sitebuilderMichael Dunn16-Sep-07 20:20 
GeneralRe: struct definition Pin
Waldermort17-Sep-07 2:03
Waldermort17-Sep-07 2:03 
GeneralRe: struct definition Pin
Iain Clarke, Warrior Programmer17-Sep-07 4:20
Iain Clarke, Warrior Programmer17-Sep-07 4:20 
AnswerRe: struct definition Pin
Randor 16-Sep-07 21:58
professional Randor 16-Sep-07 21:58 
Questionhelp Pin
john563216-Sep-07 19:50
john563216-Sep-07 19:50 
void CDisplayBody::OnNavigateComplete2(LPCTSTR strURL)<br />
{	<br />
CString pszText="<html><head><body>Hi How r u</body></head></html>";<br />
	if (GetBusy())                          // See if it's busy with something else<br />
		Stop();        <br />
<br />
	// Get a pointer to the HTML Document Object Model's interface<br />
	IDispatch * pDisp = GetHtmlDocument();<br />
	if (!pDisp)<br />
		return;<br />
<br />
	IHTMLDocument2* pDoc;<br />
	if (SUCCEEDED(pDisp->QueryInterface( IID_IHTMLDocument2, (void**)&pDoc )))<br />
	{<br />
		// Empty URL and parameters opens the current document<br />
		CComBSTR    bstrURL;<br />
		CComVariant varDummy;<br />
		pDoc->open(bstrURL, varDummy, varDummy, varDummy, NULL);<br />
<br />
		// Create a safearray to store the HTML text<br />
		SAFEARRAY      *pSA;<br />
		SAFEARRAYBOUND  saBound = {1, 0};<br />
		pSA = SafeArrayCreate(VT_VARIANT, 1, &saBound);<br />
<br />
		// Copy the HTML into the one and only element<br />
		VARIANT   *pVar;<br />
		CComBSTR   bstrHTML = pszText;              // Load the text<br />
		varDummy = bstrHTML;                        // .. into a variant<br />
<br />
		SafeArrayAccessData(pSA, (void**)&pVar);    // Access safearray data<br />
		pVar[0] = varDummy;                         // Set the text data<br />
		SafeArrayUnaccessData(pSA);                 // Release access<br />
<br />
		// Write the HTML as the document's new text<br />
		pDoc->write(pSA);                           // Overwrite HTML<br />
		pDoc->close();                              // Update browser<br />
<br />
		SafeArrayDestroy(pSA);                      // Finished with the safearray<br />
		pDoc->Release();                            // Don't forget to release the reference<br />
<br />
	}<br />
	<br />
}<br />


This code is to display html in html view But the statement (IDispatch * pDisp = GetHtmlDocument();)return Null .Why ? plz help
AnswerRe: help Pin
Hamid_RT16-Sep-07 21:56
Hamid_RT16-Sep-07 21:56 
QuestionStartService in vista Pin
samira forooghi16-Sep-07 19:39
samira forooghi16-Sep-07 19:39 
AnswerRe: StartService in vista Pin
Hamid_RT16-Sep-07 21:59
Hamid_RT16-Sep-07 21:59 
AnswerRe: StartService in vista Pin
sudarshan12416-Sep-07 22:21
sudarshan12416-Sep-07 22:21 
AnswerRe: StartService in vista Pin
samira forooghi16-Sep-07 23:21
samira forooghi16-Sep-07 23:21 
Question\\\\.\\ Pin
samira forooghi16-Sep-07 19:31
samira forooghi16-Sep-07 19:31 
AnswerRe: \\\\.\\ Pin
Michael Dunn16-Sep-07 19:34
sitebuilderMichael Dunn16-Sep-07 19:34 
GeneralRe: \\\\.\\ Pin
samira forooghi16-Sep-07 19:46
samira forooghi16-Sep-07 19:46 
AnswerRe: \\\\.\\ Pin
Hamid_RT16-Sep-07 22:24
Hamid_RT16-Sep-07 22:24 
QuestionProblem with RegEnumValue() Pin
GauranG Shah16-Sep-07 19:20
GauranG Shah16-Sep-07 19:20 
AnswerRe: Problem with RegEnumValue() Pin
Roger Broomfield16-Sep-07 19:48
Roger Broomfield16-Sep-07 19:48 
GeneralRe: Problem with RegEnumValue() Pin
GauranG Shah16-Sep-07 19:57
GauranG Shah16-Sep-07 19:57 
QuestionIs there any way to let a process write some bytes to itself's PE file? Pin
samfromcn16-Sep-07 19:08
samfromcn16-Sep-07 19:08 
AnswerRe: Is there any way to let a process write some bytes to itself's PE file? Pin
Waldermort16-Sep-07 20:11
Waldermort16-Sep-07 20:11 
GeneralRe: Is there any way to let a process write some bytes to itself's PE file? Pin
samfromcn16-Sep-07 22:45
samfromcn16-Sep-07 22:45 
GeneralRe: Is there any way to let a process write some bytes to itself's PE file? Pin
Waldermort17-Sep-07 4:06
Waldermort17-Sep-07 4:06 
GeneralRe: Is there any way to let a process write some bytes to itself's PE file? Pin
James R. Twine17-Sep-07 5:17
James R. Twine17-Sep-07 5:17 

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.