Hi,
With this sample:
[CODE]
#include "minigui.ch"
#include "hbclass.ch"
#include "i_winuser.ch"
static oMSCAL
function main
DEFINE WINDOW oMainWindow ;
AT 0,0 WIDTH GetDesktopWidth() HEIGHT GetDesktopHeight()-30 ;
TITLE "" ;
FONT "Ms Sans Serif" SIZE 9 ;
MAIN NOSIZE
DEFINE MAIN MENU OF oMainWindow
define popup "ACTIVEX"
MENUITEM "Conectar" ACTION { || oMSCAL := TxActivex():New(
"oMainWindow", "GrFingerX.GrFingerXCtrl", 0, 0, 300, 300 ) }
SEPARATOR
MENUITEM "E&xit" ACTION ThisWindow.release
end popup
END MENU
END WINDOW
ACTIVATE WINDOW oMainWindow
return nil
CLASS TxActivex
CLASS VAR winclass INIT "ACTIVEX"
DATA oOLE INIT nil
DATA hWnd INIT nil
METHOD New
METHOD Event
METHOD Destroy
ERROR HANDLER OnError
ENDCLASS
METHOD New( cWnd, cProgId, nTop, nLeft, nWidth, nHeight, cID ) CLASS
TxActivex
local nStyle
nStyle := WS_CHILD + WS_VISIBLE + WS_CLIPCHILDREN
WIN_AxInit()
::hWnd := WAPI_CreateWindowEX( 0, "AtlAxWin", cProgId, nStyle, nLeft,
nTop,nWidth, nHeight, WIN_N2P( getformhandle( cWnd ) ), 0 )
::oOLE := WIN_AxGetControl( ::hWnd, { | event, ... | ::Event( event,
... ) }, cID )
return self
METHOD Event( ... ) CLASS TxActivex
local cEvents := ""
local aEvents := { ... }
local nHandle
aEval(aEvents, { | xEvent | cEvents += HB_ValToStr( xEvent ) + ", " } )
if !file( "Event.Log" )
nHandle := fcreate( "Event.Log" )
else
nHandle := fopen( "Event.Log", 1 )
fseek( nHandle, 0, 2 )
endif
fwrite( nHandle, cEvents + chr( 13 ) + chr( 10 ) )
fclose( nHandle )
return nil
METHOD Destroy() CLASS TxActivex
MsgInfo( "Bye" )
DestroyWindow( WIN_P2N( ::hWnd ) )
::hWnd := nil
return nil
METHOD OnError() CLASS TxActivex
return HB_ExecFromArray( ::oOLE, __GetMessage(), HB_AParams() )
[ENDCODE]
...I see this error:
[ERROR]
Error WINOLE/1014 Failed to obtain connection point: __AXREGISTERHANDLER
(DOS Error -2147220992)
Called from __AXREGISTERHANDLER(0)
Called from WIN_AXGETCONTROL(0)
Called from TXACTIVEX:NEW(50)
Called from (b)MAIN(19)
Called from _DOCONTROLEVENTPROCEDURE(1612)
Called from EVENTS(1361)
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(1340)
Called from MAIN(29)
[ENDERROR]
What might be causing this error ?
Regards,
Rossine.
--
View this message in context:
http://old.nabble.com/Error-with-activex-tp27722533p27722533.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour