Page 1 of 1

ActiveX support!

Posted: Wed Apr 11, 2007 6:15 am
by Antonio Linares
ActiveX support is already working :-)

Now we are building some tests and we will publish a new build asap

Posted: Tue Apr 17, 2007 7:11 pm
by Bill Simmeth
Greetings Antonio,

This is great news!! I look forward to seeing some examples of to implement ActiveX.

Posted: Wed Apr 18, 2007 2:56 pm
by Antonio Linares
Bill,

We use the same syntax as in FWH. Quite simple :-) :

Code: Select all

#include "FWCE.ch"

function Main()

   local oWnd, oActiveX
   local cEvents := ""

   DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support"

   oActiveX = TActiveX():New( oWnd, "WMPlayer.OCX" )

   oWnd:oClient = oActiveX // To fill the entire window surface
   oActiveX:SetProp( "url", CurDir() + "\clapping.wav" )

   oActiveX:bOnEvent = { | event, aParams, pParams | cEvents += EventInfo( event, aParams, pParams, oActiveX ) }

   ACTIVATE WINDOW oWnd ;
      VALID ( MsgInfo( cEvents ), .t. )

return nil

function EventInfo( event, aParams, pParams, oActiveX )

   local cMsg := "Event: " + cValToChar( event ) + CRLF
   local n
   
   cMsg += "Params: " + CRLF
   
   for n = 1 to Len( aParams )
      cMsg += cValToChar( aParams[ n ] ) + CRLF
   next
   
return cMsg + CRLF

Re: ActiveX support!

Posted: Thu Oct 06, 2011 1:58 am
by cdmmaui
Dear Antonio,

I am getting an illegal operation trying to perform the following ActiveX call on Win CE 4. What am I doing wrong?

//--------------------------------------------------------------------
DEFINE WINDOW oWnd2 TITLE Ptitle + " - Transmit"

oActiveX = TActiveX():New( oWnd2, "Shell.Explorer" )

oWnd2:oClient = oActiveX

oActiveX:SetProp( "url", , Pdd + cPost + ".HTM" )

ACTIVATE WINDOW oWnd2