1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
// exemple de controle chargé (initialisation)
LPAtlAxGetControl AtlAxGetControl3 = (LPAtlAxGetControl)GetProcAddress(LoadLibrary("atl"),"AtlAxGetControl");
AtlAxGetControl3(w->hwnd,&unkn);
unkn->QueryInterface(__uuidof(IWebBrowser2),(void**)&brow);
// plus loin dans la boucle principale
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
// dessine la scene openGL
IViewObject* aViewObject = NULL;
brow->QueryInterface(IID_IViewObject, (LPVOID*) &aViewObject);
HDC aDC = wglGetCurrentDC();
if (aViewObject != NULL){
RECTL aRect = {0, 0, w->size.x, w->size.y};
HRGN aRgn = CreateRectRgn(0, 0, w->size.x, w->size.y);
aViewObject->Draw(DVASPECT_CONTENT, 1,NULL, NULL, NULL, aDC, &aRect, NULL, NULL,0);
aViewObject->Release();
} |
Partager