EduardoLuis wrote:Hi Dr. Claudio & Friends
I'm testing most of my frequently used routines and applications with new 3.30 & patch.-
I've discover an extrange behaviour in this sample.- Under 3.15 compilation works fine, under 3.30 all application becomes mad, really mad.-
I've attach an zip file containing both exe (3.15 compiled & 3.30 with patch compiled).- Source code is unique for both.-
With regards. Eduardo.
Hola Eduardo,
No hay nada errado con la nueva version comparado con la version 3.1.5. Lo que pasa que en esta ultima hay más nuevas funciones, es decir hay más recursos. La forma que venias utilizando no estaba correcta a mi ver.
Modifiqué tu código y funciona compilando tanto en la actual como en la 3.1.5 tambien.
Code: Select all
#include <hmg.ch>
#define BLUE1 { 218,229,243 }
#define BLUE2 { 000,120,187 }
STATIC cCtrlAnt:="", lProp:=.F.
Function Main
DEFINE WINDOW w_test AT 000 , 000 WIDTH 230 HEIGHT 380 BACKCOLOR BLUE1 TITLE "SIMULATE A MOUSE OVER --- BY AGL" MAIN
ON KEY ESCAPE ACTION Thiswindow.Release()
@ 030,010 LABEL LB_1 VALUE "Opcion 1" OF w_test WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR WHITE BACKCOLOR BLUE2 CENTERALIGN ACTION MsgInfo( "Opcion 1" )
@ 055,010 LABEL LB_2 VALUE "Opcion 2" OF w_test WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR WHITE BACKCOLOR BLUE2 CENTERALIGN ACTION MsgInfo( "Opcion 2" )
@ 080,010 LABEL LB_3 VALUE "Opcion 3" OF w_test WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR WHITE BACKCOLOR BLUE2 CENTERALIGN ACTION MsgInfo( "Opcion 3" )
@ 105,010 LABEL LB_4 VALUE "Opcion 4" OF w_test WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR WHITE BACKCOLOR BLUE2 CENTERALIGN ACTION MsgInfo( "Opcion 4" )
@ 130,010 LABEL LB_5 VALUE "Opcion 5" OF w_test WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR WHITE BACKCOLOR BLUE2 CENTERALIGN ACTION MsgInfo( "Opcion 5" )
@ 155,010 LABEL LB_6 VALUE "Opcion 6" OF w_test WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR WHITE BACKCOLOR BLUE2 CENTERALIGN ACTION MsgInfo( "Opcion 6" )
@ 250,000 LABEL LB_7 VALUE "" WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR BLACK CENTERALIGN TRANSPARENT
DEFINE STATUSBAR FONT "Courier New" SIZE 9
STATUSITEM PadC("",75)
END STATUSBAR
END WINDOW
CREATE EVENT PROCNAME SELECTCTRL() HWND W_test.HANDLE
CENTER WINDOW w_test
ACTIVATE WINDOW w_test
RETURN Nil
FUNCTION SelectCtrl()
Local cCtrl, cForm, cTemp
Local hWnd := EventHWND()
Local wParam:= EventWPARAM()
If wParam <> w_test.HANDLE
GetControlNameByHandle( wParam, @cCtrl, @cForm )
cTemp:=ALLTRIM( cForm )+If(!Empty(cCtrl),"_"+ALLTRIM( cCtrl ),"")
w_test.LB_7.VALUE := cTemp
_SetItem ( 'StatusBar' , "w_test" , 1 , cTemp )
IF cTemp==cForm
IF lProp
// La intencion es hacer que la Funcion acepte cualquier nombre de Ventana, pero de esta forma no se ejecuta el ACTION del LABEL !
// The intention is to make the function accepts any window name, but this way the ACTION of LABEL is not running!
SetProperty( "w_test", cCtrlAnt, "FONTBOLD" , .F. )
SetProperty( "w_test", cCtrlAnt, "FONTSIZE" , 9 )
SetProperty( "w_test", cCtrlAnt, "BACKCOLOR", BLUE2 )
lProp:=.F.
ENDIF
ELSE
IF ! empty(cCtrl)
IF ! lProp
SetProperty( "w_test", cCtrl, "FONTBOLD" , .T. )
SetProperty( "w_test", cCtrl, "FONTSIZE" , 12 )
SetProperty( "w_test", cCtrl, "BACKCOLOR", BLUE )
cCtrlAnt:=cCtrl
lProp:=.T.
ENDIF
ENDIF
ENDIF
Endif
RETURN Nil
Sobre tus mensajes con anexo, que es lo que te pasaba ? Te daba algun mensaje de error (decinos cual) o no supiste anexarlo ? (Por favor respondeme todo esto, porque quiero saber). Re-edicté tu mensaje disponibilizando apenas los archivos que mencionas.
Espero haberte ayudado y que hayas entendido el código modificado.
Un abrazo/Pablo
Hi Eduardo,
There is nothing wrong with the new version compared to version 3.1.5. What happened was that in the 3.3.0 there are more new features, ie more resources.
The way you were coming using was not correct in my opinion.
I modified your code and it works by compiling both the current as in 3.1.5 also.
About your posts with attached files, what happen to you ? Displayed any error message (pls tell us) or you did not know how to do it ? I re-edited your previous message making available the files you have mentioned.
I hope this would helps and you have understood the modified code.
A hug / Pablo