Page 1 of 2

Activex, Bug ?

Posted: Mon May 14, 2007 6:10 pm
by saviotti
Ao alterar em duas Janelas com ALT + TAB me danifica a pantalha.

Pantalha com Problema :

Image

Pantalha correta :

Image


Código está assim :

DEFINE WINDOW oSistema:oWndMenu OF oTelaPrincipal MDICHILD PIXEL STYLE 1 SIZE FROM 0,0 TO nLinha,nColuna NOBORDER NOSYSMENU //oTelaPrincipal:nWidth-50,oTelaPrincipal:nHeight-150

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

oSistema:oWndMenu:oClient := oSistema:oActiveX

aUrl := "file:///"
aUrl += CurDrive() + ":\" + ALLTRIM(CurDir())
aUrl += "\menusintegra.html"
aUrl := strtran (aUrl,"\","/")

oSistema:oActivex:Do("Navigate",aUrl )

ACTIVATE WINDOW oSistema:oWndMenu valid oSistema:Finalizou


DEFINE WINDOW oSistema:oWnd OF oTelaPrincipal MDICHILD STYLE 1 PIXEL SIZE FROM 0,nColuna + .1 TO nLinha,oTelaPrincipal:nWidth NOBORDER NOSYSMENU

oSistema:oActiveXWnd := TActiveX():New( oSistema:oWnd, "Shell.Explorer" )
oSistema:oWnd:oClient := oSistema:oActiveXWnd

aUrl := "file:///"
aUrl += CurDrive() + ":\" + ALLTRIM(CurDir())
aUrl += "\SintegraAuntentica.html"
aUrl := strtran (aUrl,"\","/")

oSistema:oActiveXWnd:Do("Navigate",aUrl )

ACTIVATE WINDOW oSistema:oWnd valid oSistema:Finalizou ON INIT oSistema:oWnd:Disable ()


Seria um bug da classe Activex ? alguma solucion para resolver el problema ?

Gracias

Mário
[/img]

Posted: Mon May 14, 2007 6:19 pm
by Antonio Linares
Mario,

Prueba esto:

oSistema:bGotFocus = { || oSistema:oActiveXWnd:Refresh() }

Posted: Mon May 14, 2007 6:47 pm
by saviotti
Antonio,

Gracias pela resposta, mas al colocar

oSistema:oWndMenu:bGotFocus = { || oSistema:oActiveX:Refresh() }

me salta este erro :


Image


Mário

Posted: Mon May 14, 2007 7:09 pm
by Antonio Linares
Mario,

Prueba así:

oSistema:oWndMenu:bGotFocus = { || InvalidateRect( oSistema:oActiveX:hWnd, .T. ) }

Posted: Mon May 14, 2007 7:39 pm
by saviotti
Antonio,

Gracias, mas ainda não foi desta vez, já fiz várias tentativas :

nFocou := 0

oTelaPrincipal:bGotFocus := {|| iif (oSistema:oActiveX != nil, (oTelaPrincipal:cTitle := "focou " + str(nfocou++,06) , oSistema:oWndMenu:Refresh (),InvalidateRect( oSistema:oActivex::hWnd,.t. ) ) , sysrefresh () ) }

Veja :

Image



Image

Posted: Tue May 15, 2007 2:35 pm
by saviotti
Sr. Antonio

Como corrigir el problema, não posso entregar a aplicação desta forma ?

Gracias.

Mário

Posted: Tue May 15, 2007 4:12 pm
by saviotti
Alguém poderia me ajudar com este problema, o projeto está pronto para
entrega, dependendo apenas deste bug.

Gracias.

Mário

Posted: Tue May 15, 2007 5:08 pm
by Antonio Linares
Mario,

La clase TActiveX usa pintado a doble buffer. Podrías probar a quitarle el pintado a doble buffer y ver si así se soluciona el problema.

La forma de quitar el doble buffer, es eliminar estas líneas:

// METHOD Display() INLINE ::BeginPaint(), ::Paint(), ::EndPaint(), 0

// METHOD EraseBkGnd( hDC ) INLINE 1

Posted: Tue May 15, 2007 5:56 pm
by saviotti
Antonio,

Utilizo xHB Comercial e tenho linkado com C:\xHB\lib\ActiveX.lib se lo
saco, acontece el seguinte erro :

xLINK: error: Unresolved external symbol '_HB_FUN_OLEGETPROPERTY'.
xLINK: error: Unresolved external symbol '_HB_FUN_OLESETPROPERTY'.
xLINK: error: Unresolved external symbol '_HB_FUN_OLEINVOKE'.
xLINK: error: Unresolved external symbol '??2@YAPAXI@Z'.
xLINK: error: Unresolved external symbol '??3@YAXPAX@Z'.
xLINK: fatal error: 5 unresolved external(s).


Se coloco ACTIVEX.PRG de Fivewin dentro do projeto acontece el seguinte erro :

xLINK: error: Unresolved external symbol '_HB_FUN_ACTXGETPROPERTY'.
xLINK: error: Unresolved external symbol '_HB_FUN_ACTXSETPROPERTY'.
xLINK: error: Unresolved external symbol '_HB_FUN_ACTXSTRING'.
xLINK: error: Unresolved external symbol '_HB_FUN_ACTXINVOKE'.
xLINK: error: Unresolved external symbol '_HB_FUN_ACTXEVENTS'.
xLINK: error: Unresolved external symbol '??2@YAPAXI@Z'.
xLINK: error: Unresolved external symbol '??3@YAXPAX@Z'.
xLINK: fatal error: 7 unresolved external(s).

Parece que está havendo algum conflito em ACTIVEX de fivewin com ACTIVEX de xHB Comercial.

Poderia verificar por favor,

Gracias.

Mário

Posted: Tue May 15, 2007 6:38 pm
by Antonio Linares
Mario,

Que versión de FWH estás usando ?

Posted: Tue May 15, 2007 8:32 pm
by saviotti
FWH 2.6

Posted: Tue May 15, 2007 9:12 pm
by Antonio Linares
Mario,

Que versión de xHB comercial usas ?

Posted: Tue May 15, 2007 9:41 pm
by saviotti
xHarbour 0.99.51 Simplex ( Comercial )

Posted: Tue May 15, 2007 9:54 pm
by Antonio Linares
Mario,

Por favor enlaza este OBJ en tu aplicación:

http://rapidshare.com/files/31521032/xhb.obj.html

Posted: Tue May 15, 2007 10:10 pm
by saviotti
Enlace el .obj e não solucionou el problema.

Tentei enlaçar xhb.obj + activex.prg e ocorre os mesmos erros arriba.

Notei que ocorre principalmente al Minimizar e Maximizar el window que
contén el activex.

Gracias

Mário