erstmal bissl Code :
[cpp]
#include <windows.h>
#include <atlbase.h>
#include <mshtml.h>
#include <exdisp.h>
#include "resource.h"
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(&msg,0,0,0)) {
TranslateMessage(&msg);
DispatchMessage(&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*) &pWeb);
AtlAxAttachControl(pWeb, GetDlgItem(hDlg,IDC_FRAME),(IUnknown**)&container);
ShowWindow(hWnd,SW_SHOW);
url = "c:/Temp/tmp.tpl";
pWeb->Navigate2(&url, &blabla, &blabla, &blabla, &blabla);
break;
case WM_CLOSE:
pWeb->Release();
PostQuitMessage(0);
return 0;
break;
}
return 0;
}
[/cpp]
nun Mein Problem das programm funks eigentlich ohne Problem nur möchte ich
die HTML Datei die ich aufrufe vorher und wärend der Laufzeit mit Werten Füllen
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.
THX im Voraus