General Help regarding HMG, Compilation, Linking, Samples
Moderator: Rathinagiri
Pablo César
Posts: 4059 Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Post
by Pablo César » Wed Jul 15, 2015 3:54 pm
luisvasquezcl wrote: si es con o sin comillas ya que siempre funcionará
Gracias Luis y Dave. De facto es perfectamente aplicable lo indicado. Si realizas esta prueba verás:
Code: Select all
#include <hmg.ch>
#xtranslate IsCtrlDefined ( <ControlName> , <FormName> ) ;
=> ;
_IsCtrlDefined ( <"ControlName"> , <"FormName"> )
Function Main
DEFINE WINDOW Win_1 ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 400 ;
TITLE 'Hello World-2' ;
MAIN
DEFINE LABEL lblHello
ROW 275
COL 125
WIDTH 150
VALUE "Hello World !"
FONTNAME "Lucida"
FONTSIZE 16
END LABEL
DEFINE BUTTON Button_1
ROW 340
COL 140
WIDTH 100
HEIGHT 28
ACTION IsCtrlDefined(lblHello,Win_1)
CAPTION "Button_1"
FONTNAME "Arial"
END BUTTON
END WINDOW
CENTER WINDOW Win_1
ACTIVATE WINDOW Win_1
Return Nil
Function _IsCtrlDefined( ControlName, WindowName )
ControlName := CharRem( Chr(34)+Chr(39), ControlName )
WindowName := CharRem ( Chr(34)+Chr(39), WindowName )
Win_1.lblHello.Value:=ControlName+WindowName
MsgDebug( ControlName, WindowName, _IsControlDefined( ControlName, WindowName ) )
Return Nil
Gracias tambien por tu participacion, como siempre levantando cuestiones y asuntos de importancia.
Saludos,
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Rathinagiri
Posts: 5481 Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:
Post
by Rathinagiri » Wed Jul 15, 2015 3:59 pm
That is a very nice idea. We shall implement in the next version.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Pablo César
Posts: 4059 Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Post
by Pablo César » Wed Jul 15, 2015 4:15 pm
Thank you Rathi !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
srvet_claudio
Posts: 2223 Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:
Post
by srvet_claudio » Wed Jul 15, 2015 5:31 pm
Pablo César wrote: luisvasquezcl wrote: Asumi que la funcion llevaba los parametros entre comillas por eso no me funcionaba.
Seria bueno agregar un ejemplo pequeño a la documentacion para asi aclarar el correcto uso.
Está bien Luis, a mi ya me pasó várias veces.
Creo que no será necesário si adoptamos lo siguiente.
Dear Rathi,
If we add following at C:\hmg.3.4.1\SOURCE\h_controlmisc.prg as follows (grey backcolor):
Doing this, It will be fine for both of ways. Even with single quotes
or double quotes
or even mixed.
What do you think, can be implemented at HMG core ? Then we can avoid any confusion about thhis old missundertanding.
Rgds
Done in IsControlDefine() and IsWindowDefine()
Pablo César
Posts: 4059 Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Post
by Pablo César » Wed Jul 15, 2015 6:49 pm
srvet_claudio wrote: Done in IsControlDefine() and IsWindowDefine()
Thank you Claudio !
By the same way, could you apply also to:
IsWindowActive ==> _IsWindowActive function
And some others like (probably this would be not so necessary):
SET CONTROL <ControlName> OF <FormName> ==> _HMG_SetControlData function
SET TOOLTIPCUSTOMDRAW FORM <FormName> == > SetToolTipCustomDrawForm function
SET WINDOW <FormName> TRANSPARENT TO ==> SetLayeredWindowAttributes function
FLASH WINDOW <FormName> ==> FlashWindowEx function
ANIMATE WINDOW <FormName> ==> AnimateWindow function
Sorry to give you this work but we could set it for all with the same needing.
I do not know if there is some more.
B.Rgds
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
luisvasquezcl
Posts: 1261 Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:
Post
by luisvasquezcl » Wed Jul 15, 2015 8:16 pm
Excelentes noticias aplicar este ajuste, hará las funciones mucho más flexibles y a toda prueba.
Gracias a todos.
Saludos cordiales,
Great news apply this setting, will make more flexible features and foolproof.
Thanks to all.
Best regards,