<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Probleme mit Webbrowser Control]]></title><description><![CDATA[<p>erstmal bissl Code :</p>
<pre><code>[cpp]
#include &lt;windows.h&gt;
#include &lt;atlbase.h&gt;
#include &lt;mshtml.h&gt;
#include &lt;exdisp.h&gt;
#include &quot;resource.h&quot;

HWND hWnd;
IWebBrowser2 *pWeb;
IAxWinHostWindow* container;

int CALLBACK MainDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);

//========================================================
// WinMain()
// Program Entry Point
//========================================================
int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow ) {
	MSG msg;

	CoInitialize(0);
	hWnd = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_MAIN), 0, MainDlgProc);
	ShowWindow(hWnd,SW_SHOW);

	while(GetMessage(&amp;msg,0,0,0)) {
		TranslateMessage(&amp;msg);
		DispatchMessage(&amp;msg);
	}
	CoUninitialize();

	return 0;
}

//========================================================
// MainDlgProc()
// CALLBACK function von funky main dialog
//========================================================
int CALLBACK MainDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam) {
	CComVariant url, blabla;

	switch(wMsg) {

	case WM_INITDIALOG:

		CoCreateInstance(CLSID_WebBrowser, NULL, CLSCTX_INPROC_SERVER, IID_IWebBrowser2, (LPVOID*) &amp;pWeb);
		AtlAxAttachControl(pWeb, GetDlgItem(hDlg,IDC_FRAME),(IUnknown**)&amp;container);

		ShowWindow(hWnd,SW_SHOW);

		url = &quot;c:/Temp/tmp.tpl&quot;;
		pWeb-&gt;Navigate2(&amp;url, &amp;blabla, &amp;blabla, &amp;blabla, &amp;blabla);
	break;

	case WM_CLOSE:
		pWeb-&gt;Release();
		PostQuitMessage(0);
		return 0;
		break;
	}

return 0;
}

[/cpp]
</code></pre>
<p>nun Mein Problem das programm funks eigentlich ohne Problem nur möchte ich<br />
die HTML Datei die ich aufrufe vorher und wärend der Laufzeit mit Werten Füllen<br />
da ich mich mit diesen Browser Element nicht so auskenn, hoffe ich nun das ihr mir n Parr Tipps geben könnt eventuell sogar ne Bessere Möglichkeit habt.<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> THX im Voraus</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/180111/probleme-mit-webbrowser-control</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Jul 2026 11:08:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/180111.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 29 Apr 2007 00:11:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme mit Webbrowser Control on Sun, 29 Apr 2007 00:12:32 GMT]]></title><description><![CDATA[<p>erstmal bissl Code :</p>
<pre><code>[cpp]
#include &lt;windows.h&gt;
#include &lt;atlbase.h&gt;
#include &lt;mshtml.h&gt;
#include &lt;exdisp.h&gt;
#include &quot;resource.h&quot;

HWND hWnd;
IWebBrowser2 *pWeb;
IAxWinHostWindow* container;

int CALLBACK MainDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);

//========================================================
// WinMain()
// Program Entry Point
//========================================================
int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow ) {
	MSG msg;

	CoInitialize(0);
	hWnd = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_MAIN), 0, MainDlgProc);
	ShowWindow(hWnd,SW_SHOW);

	while(GetMessage(&amp;msg,0,0,0)) {
		TranslateMessage(&amp;msg);
		DispatchMessage(&amp;msg);
	}
	CoUninitialize();

	return 0;
}

//========================================================
// MainDlgProc()
// CALLBACK function von funky main dialog
//========================================================
int CALLBACK MainDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam) {
	CComVariant url, blabla;

	switch(wMsg) {

	case WM_INITDIALOG:

		CoCreateInstance(CLSID_WebBrowser, NULL, CLSCTX_INPROC_SERVER, IID_IWebBrowser2, (LPVOID*) &amp;pWeb);
		AtlAxAttachControl(pWeb, GetDlgItem(hDlg,IDC_FRAME),(IUnknown**)&amp;container);

		ShowWindow(hWnd,SW_SHOW);

		url = &quot;c:/Temp/tmp.tpl&quot;;
		pWeb-&gt;Navigate2(&amp;url, &amp;blabla, &amp;blabla, &amp;blabla, &amp;blabla);
	break;

	case WM_CLOSE:
		pWeb-&gt;Release();
		PostQuitMessage(0);
		return 0;
		break;
	}

return 0;
}

[/cpp]
</code></pre>
<p>nun Mein Problem das programm funks eigentlich ohne Problem nur möchte ich<br />
die HTML Datei die ich aufrufe vorher und wärend der Laufzeit mit Werten Füllen<br />
da ich mich mit diesen Browser Element nicht so auskenn, hoffe ich nun das ihr mir n Parr Tipps geben könnt eventuell sogar ne Bessere Möglichkeit habt.<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> THX im Voraus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1275482</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1275482</guid><dc:creator><![CDATA[Ascharan]]></dc:creator><pubDate>Sun, 29 Apr 2007 00:12:32 GMT</pubDate></item></channel></rss>