Francesco Saverio Giudice wrote:
Are these two different things the same ActiveX?
I will look at Pritpal's upload, but, as I wrote before, I would like to
have an independent (from gtwvg) version.
I've extended my previous sample by:
===========================================================
HB_AtlAxGetControl( hWndAx, @pDisp )
IF ! EMPTY( pDisp )
oAx := HB_OleAuto()
oAx:__hObj := pDisp
ENDIF
===========================================================
and
===========================================================
HB_FUNC( HB_ATLAXGETCONTROL )
{
IUnknown* pUnk = NULL;
IDispatch* pDisp = NULL;
PHB_ITEM pItem;
HRESULT lOleError;
lOleError = ( *s_pAtlAxGetControl )( ( HWND ) hb_parptr( 1 ), &pUnk );
if( lOleError == S_OK )
{
/* AtlAxGetControl returns IUnknown, but we are goint to use OLE
Automation
on ActiveX control, so let's deal with IDispatch only
[Mindaugas] */
#if HB_OLE_C_API
lOleError = pUnk->lpVtbl->QueryInterface( pUnk, &IID_IDispatch, (
void** ) ( void * ) &pDisp );
pUnk->lpVtbl->Release( pUnk );
#else
lOleError = pUnk->QueryInterface( IID_IDispatch, ( void** ) (
void * ) &pDisp );
pUnk->Release();
#endif
}
if( lOleError == S_OK )
{
pItem = hb_oleItemPut( NULL, pDisp );
hb_itemParamStoreForward( 2, pItem );
hb_itemRelease( pItem );
hb_retnl( S_OK );
}
else
{
/* TODO: RTE */
}
hb_retnl( lOleError );
}
===========================================================
And I can navigate (using menu commands):
oAx:Navigate("http://sourceforge.net")
oAx:Navigate("http://www.google.lt")
oAx:GoBack()
oAx:GoForward()
oAx:Refresh()
without any problem.
Do we have some light-weight WinAPI library now? (To include these
samples in to Harbour). WHAT32 was something like that...
I'll try to look into event handling tomorrow.
Regards,
Mindaugas
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour