Page 1 of 1

ActiveX -- Para Antonio

PostPosted: Wed Jan 25, 2006 5:50 pm
by VeRCE
Hola Antonio.

Habrá mejoras en los componentes ActiveX soportados
por fivewin???

Se podrán usar en diálogos desde recursos?
que sucederá con los eventos ?

Gracias por la atención.

PostPosted: Wed Jan 25, 2006 7:59 pm
by Antonio Linares
Juan Carlos,

Ya tenemos algunos avances con los eventos. Confiamos en poder completarlos.

PostPosted: Wed Jan 25, 2006 9:09 pm
by VeRCE
Gracias Antonio.
Aprovechando, explícame algo por favor..
Porqué es posible usar un control ActiveX en una
ventana y en un dialogo no?

Se podrá desde recursos??

Gracias

PostPosted: Wed Jan 25, 2006 9:46 pm
by Antonio Linares
Juan Carlos,

Acabamos de probar los ActiveX en diálogos y funcionan correctamente. Aquí tienes un ejemplo:

Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg

   DEFINE DIALOG oDlg TITLE "FiveWin ActiveX Support" SIZE 500, 300

   ACTIVATE DIALOG oDlg ;
      ON INIT SetActX( oDlg ) ;
      CENTERED

return nil

function SetActX( oDlg )

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

   oDlg:oClient = oActiveX // To fill the entire window surface
   oDlg:Resize()

   oActiveX:Do( "GoHome" )

return nil


Lo que sí falta es implementar el método Redefine()

PostPosted: Wed Jan 25, 2006 10:43 pm
by Antonio Linares
Juan Carlos,

Aquí está la Clase TActiveX con el método Redefine() y otros necesarios implementados: http://hyperupload.com/download/dbb9718 ... x.zip.html

Y aquí un ejemplo de uso:
Code: Select all  Expand view
// Using an ActiveX in a dialog.

#include "FiveWin.ch"

function Main()

   local oDlg, oActiveX

   DEFINE DIALOG oDlg RESOURCE "Test"

   oActiveX = TActiveX():Redefine( 10, oDlg, "Shell.Explorer" )
   
   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT oActiveX:Do( "GoHome" )

return nil


Code: Select all  Expand view
#ifdef __FLAT__
   1 24 "./../WinXP/WindowsXP.Manifest"
#endif
#define DIALOG_1   1

Test DIALOG 84, 77, 194, 119
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "ActiveX Test"
FONT 8, "MS Sans Serif"
{
   CONTROL "", 10, "TActiveX", 0 | WS_CHILD | WS_VISIBLE, 11, 9, 171, 100
}

PostPosted: Wed Jan 25, 2006 10:52 pm
by Antonio Linares
Y el comando que lo hace más sencillo de usar:

Code: Select all  Expand view
#xcommand REDEFINE ACTIVEX <oActX> ;
             [ ID <nId> ];
             [ <of: OF, WINDOW, DIALOG> <oWnd> ] ;
             [ PROGID <cProgID> ] ;
       => ;
          <oActX> := TActiveX():Redefine( <nId>, <oWnd>, <cProgID> )


REDEFINE ACTIVEX oActiveX ID 10 OF oDlg PROGID "Shell.Explorer"

PostPosted: Thu Jan 26, 2006 1:47 am
by Taiwan
Hello Antonio,

Could you send to me this file?
My NB can't download it.
Thank you.

Regards,

Richard
richard.service@seed.net.tw

PostPosted: Thu Jan 26, 2006 10:57 am
by Antonio Linares
Richard,

Already sent.

PostPosted: Thu Jan 26, 2006 3:25 pm
by VeRCE
Que tal Antonio

Recién llego a la oficina y veo esto que acabas
de poner y solo me resta decirte

MIL GRACIAS! está genial !!!!

Saludos