Activex, Bug ?

saviotti
Posts: 43
Joined: Thu Feb 15, 2007 7:45 pm
Location: Brasil
Contact:

Activex, Bug ?

Post 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]
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Mario,

Prueba esto:

oSistema:bGotFocus = { || oSistema:oActiveXWnd:Refresh() }
regards, saludos

Antonio Linares
www.fivetechsoft.com
saviotti
Posts: 43
Joined: Thu Feb 15, 2007 7:45 pm
Location: Brasil
Contact:

Post by saviotti »

Antonio,

Gracias pela resposta, mas al colocar

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

me salta este erro :


Image


Mário
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Mario,

Prueba así:

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

Antonio Linares
www.fivetechsoft.com
saviotti
Posts: 43
Joined: Thu Feb 15, 2007 7:45 pm
Location: Brasil
Contact:

Post 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
saviotti
Posts: 43
Joined: Thu Feb 15, 2007 7:45 pm
Location: Brasil
Contact:

Post by saviotti »

Sr. Antonio

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

Gracias.

Mário
saviotti
Posts: 43
Joined: Thu Feb 15, 2007 7:45 pm
Location: Brasil
Contact:

Post by saviotti »

Alguém poderia me ajudar com este problema, o projeto está pronto para
entrega, dependendo apenas deste bug.

Gracias.

Mário
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
saviotti
Posts: 43
Joined: Thu Feb 15, 2007 7:45 pm
Location: Brasil
Contact:

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Mario,

Que versión de FWH estás usando ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
saviotti
Posts: 43
Joined: Thu Feb 15, 2007 7:45 pm
Location: Brasil
Contact:

Post by saviotti »

FWH 2.6
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Mario,

Que versión de xHB comercial usas ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
saviotti
Posts: 43
Joined: Thu Feb 15, 2007 7:45 pm
Location: Brasil
Contact:

Post by saviotti »

xHarbour 0.99.51 Simplex ( Comercial )
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Mario,

Por favor enlaza este OBJ en tu aplicación:

http://rapidshare.com/files/31521032/xhb.obj.html
regards, saludos

Antonio Linares
www.fivetechsoft.com
saviotti
Posts: 43
Joined: Thu Feb 15, 2007 7:45 pm
Location: Brasil
Contact:

Post 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
Post Reply