Hi Mindaugas, I'd certainly welcome your lightweight AX implementation, this way hopefully not every contrib would need to reinvent it again and again.
As for lightweight winapi, HBWHAT had a lot of problems, so it's no more. Some WINAPI's are now implemented (hopefully properly) as WAPI_*() functions in HBWIN. But this effort seem to have stalled. Your CAWI lib still looks far the best I've seen. Too bad we don't have it in Harbour :) Brgds, Viktor On Tue, May 19, 2009 at 12:44 AM, Mindaugas Kavaliauskas <dbto...@dbtopas.lt> wrote: > 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 > _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour