Hi,
Pritpal Bedi wrote:
Mindaugas Kavaliauskas wrote:
The middle part of mail window is not redrawn, but I get no error.
It means ActiveX is not initialized even.
I will apply your changes and will do some tests todays.
Till then...
wvgax.prg wvgsink.c if full of commented out code, full of #if 0, #if 1.
Only now I've noticed, that actually it uses HB_Ax_AtlAxGetControl(),
but not HB_AX_AtlAxCreateControl(). So, please use the following diff
for wvgsink.c:
Index: C:/harboursvn/contrib/gtwvg/wvgsink.c
===================================================================
--- C:/harboursvn/contrib/gtwvg/wvgsink.c (revision 11075)
+++ C:/harboursvn/contrib/gtwvg/wvgsink.c (working copy)
@@ -101,6 +101,7 @@
#include "hbvm.h"
#include "hbstack.h"
#include "hbthread.h"
+#include "..\hbwin\hbwinole.h"
#include <shlobj.h>
#include <objbase.h>
@@ -111,7 +112,7 @@
#include <ole2.h>
#include <oleauto.h>
-
+/*
#if defined( __cplusplus ) && \
( defined( __BORLANDC__ ) || defined( _MSC_VER ) || \
( defined(__WATCOMC__) && ( __WATCOMC__ >= 1280 ) ) )
@@ -120,6 +121,8 @@
# define HB_ID_REF( id ) ( &(id) )
#endif
+*/
+
/*----------------------------------------------------------------------*/
#if defined(__BORLANDC__) && !defined(HB_ARCH_64BIT)
@@ -139,10 +142,7 @@
typedef HRESULT ( CALLBACK *PATLAXCREATECONTROL )( LPCOLESTR, HWND,
IStream*, IUnknown** );
typedef HRESULT ( CALLBACK *PATLAXCREATECONTROLEX )( LPCOLESTR, HWND,
IStream*, IUnknown**, IUnknown**, REFIID, IUnknown* );
/*----------------------------------------------------------------------*/
-HB_EXPORT void hb_oleItemToVariant( VARIANT *pVariant, PHB_ITEM pItem );
-HRESULT hb_oleVariantToItem( PHB_ITEM pItem, VARIANT *pVariant );
-
/* Switch it on when required tracing. While committing switch it off */
#if 0
#define __HBTOOUT__
@@ -707,7 +707,7 @@
LPIID riid = ( LPIID ) &IID_IDispatch;
int n = 0;
- hr = SetupConnectionPoint( ( device_interface* ) ( HB_PTRDIFF )
hb_parnint( 1 ), ( REFIID ) riid, ( void** ) (void*) &hSink, &n ) ;
+ hr = SetupConnectionPoint( ( device_interface* ) hb_oleParam( 1 ), (
REFIID ) riid, ( void** ) (void*) &hSink, &n ) ;
hSink->pEvents = hb_itemNew( hb_param( 4, HB_IT_ANY ) );
@@ -881,7 +881,7 @@
{
pUnk->lpVtbl->QueryInterface( pUnk, HB_ID_REF(
IID_IDispatch ), ( void** ) (void*) &obj );
pUnk->lpVtbl->Release( pUnk );
- hb_retnint( ( HB_PTRDIFF ) obj );
+ hb_itemReturnRelease( hb_oleItemPut( NULL, obj ) );
#if 0
{
@@ -898,7 +898,7 @@
pUnkCtrl->lpVtbl->QueryInterface( pUnkCtrl, HB_ID_REF(
IID_IDispatch ), ( void** ) (void*) &obj );
pUnkCtrl->lpVtbl->Release( pUnkCtrl );
- hb_retnint( ( long ) obj );
+ hb_itemReturnRelease( hb_oleItemPut( NULL, obj ) );
GetClientRect( hContainer, &rc );
MoveWindow( GetDlgItem( hContainer, ( int ) id ), 0, 0,
rc.right-rc.left, rc.bottom-rc.top, TRUE );
@@ -906,17 +906,17 @@
#endif
else
{
- hb_retnint( 0 );
+ hb_ret();
}
}
else
{
- hb_retnint( 0 );
+ hb_ret();
}
}
else
{
- hb_retnint( 0 );
+ hb_ret();
}
/* return the container handle */
@@ -993,21 +993,21 @@
GetClientRect( hWnd, &rc );
/* MoveWindow( GetDlgItem( hParent, ( int ) id ), 0, 0,
rc.right-rc.left, rc.bottom-rc.top, TRUE ); */
MoveWindow( hWnd, 0, 0, rc.right-rc.left,
rc.bottom-rc.top, TRUE );
- hb_retnint( ( HB_PTRDIFF ) obj );
+ hb_itemReturnRelease( hb_oleItemPut( NULL, obj ) );
}
else
{
- hb_retnint( 0 );
+ hb_ret();
}
}
else
{
- hb_retnint( 0 );
+ hb_ret();
}
}
else
{
- hb_retnint( 0 );
+ hb_ret();
}
/* return the control handle */
==============================================================
Regards,
Mindaugas
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour