|
Iniciado por guillermo, 14,ene. 2006 09:49 - 6 respuestas |
| |
| | | |
|
| |
Publicado el 14,enero 2006 - 09:49 |
Hi forum..... I need a little help with this Api ... really, I'm lost with the use of this Extract with WDApi the following code FunctionResult is int // C Type:HWND lpClassName is int // C Type:LPCSTR, is a string address, you can also specify a string directly lpWindowName is int // C Type:LPCSTR, is a string address, you can also specify a string directly FunctionResult=API("USER32","FindWindowA",lpClassName,lpWindowName) If my caption window is "Tipo de Operaciones", where I put this string to apply the function ?. I try many time without success Thanks Guillermo |
| |
| |
| | | |
|
| | |
| |
Publicado el 14,enero 2006 - 19:29 |
Hi Guillermo Try using this little test: funcRes is int lpclassname is string lpwindowName is string=MyWindow..Title funcRes=API ("user32.dll","FindWindowA",0,lpwindowName) Info (funcRes) If "FuncRes" > 0 then the result is TRUE, otherwise it is false. Hope in this help. If you need more informations on how to use Api, pls, feel free to contact me using my e-mail address. Gianni
Hi forum..... I need a little help with this Api ... really, I'm lost with the use of this Extract with WDApi the following code FunctionResult is int // C Type:HWND lpClassName is int // C Type:LPCSTR, is a string address, you can also specify a string directly lpWindowName is int // C Type:LPCSTR, is a string address, you can also specify a string directly FunctionResult=API("USER32","FindWindowA",lpClassName,lpWindowName) If my caption window is "Tipo de Operaciones", where I put this string to apply the function ?. I try many time without success Thanks Guillermo |
| |
| |
| | | |
|
| | |
| |
Publicado el 15,enero 2006 - 21:53 |
Hi Gianni.... I try with your tip Thanks..... Guillermo
Hi Guillermo Try using this little test: funcRes is int lpclassname is string lpwindowName is string=MyWindow..Title funcRes=API ("user32.dll","FindWindowA",0,lpwindowName) Info (funcRes) If "FuncRes" > 0 then the result is TRUE, otherwise it is false. Hope in this help. If you need more informations on how to use Api, pls, feel free to contact me using my e-mail address. Gianni Hi forum..... I need a little help with this Api ... really, I'm lost with the use of this Extract with WDApi the following code FunctionResult is int // C Type:HWND lpClassName is int // C Type:LPCSTR, is a string address, you can also specify a string directly lpWindowName is int // C Type:LPCSTR, is a string address, you can also specify a string directly FunctionResult=API("USER32","FindWindowA",lpClassName,lpWindowName) If my caption window is "Tipo de Operaciones", where I put this string to apply the function ?. I try many time without success Thanks Guillermo |
| |
| |
| | | |
|
| | |
| |
Publicado el 15,enero 2006 - 21:54 |
Guillermo
If the window you are looking for is not written with Windev you have better to use its class name (SpyXX), then if ever the caption changes, you will still find it. (Note: the class name of a Windev's window is "WinDevObject")
HFound is int lpclassname is string = "Windev 10" HFound = API ("user32.dll", "FindWindowA", lpclassname, 0) IF HFound THEN Info ("The Windev editor is still active") |
| |
| |
| | | |
|
| | |
| |
Publicado el 16,enero 2006 - 23:43 |
Hi forum ..... I cannot find the way of making work correctly to FindWindow, always result return 0 (Zero) I put the code in various places with the same result funcRes is int pclassname is string pwindowName is string=MyWindow..Title funcRes=API ("user32.dll","FindWindowA",0,lpwindowName) Info (funcRes)
Thanks.... Guillermo
Hi Gianni.... I try with your tip Thanks..... Guillermo Hi Guillermo Try using this little test: funcRes is int lpclassname is string lpwindowName is string=MyWindow..Title funcRes=API ("user32.dll","FindWindowA",0,lpwindowName) Info (funcRes) If "FuncRes" > 0 then the result is TRUE, otherwise it is false. Hope in this help. If you need more informations on how to use Api, pls, feel free to contact me using my e-mail address. Gianni Hi forum..... I need a little help with this Api ... really, I'm lost with the use of this Extract with WDApi the following code FunctionResult is int // C Type:HWND lpClassName is int // C Type:LPCSTR, is a string address, you can also specify a string directly lpWindowName is int // C Type:LPCSTR, is a string address, you can also specify a string directly FunctionResult=API("USER32","FindWindowA",lpClassName,lpWindowName) If my caption window is "Tipo de Operaciones", where I put this string to apply the function ?. I try many time without success Thanks Guillermo |
| |
| |
| | | |
|
| | |
| |
Publicado el 17,enero 2006 - 11:45 |
Yes it does.
funcRes is int pclassname is string pwindowName is string=MyWindow..Title funcRes=API ("user32.dll","FindWindowA",0,lpwindowName) Info (funcRes) With API calls don't use String types but Asciiz String types and most of the time use a pointer to the Asciiz string. (the 'lp' prefix of the variable name stands for 'long pointer', see also Hungarian notation. So:
funcRes is int asWindowName is ASCIIZ string on 255 lpWindowName is int asWindowName=MyWindow..Title lpWindowName=&asWindowName funcRes=API ("user32.dll","FindWindowA",0,lpWindowName) Info (funcRes)
But off course: funcRes=API ("user32.dll","FindWindowA",0,&asWindowName) is also working. -- Peter |
| |
| |
| | | |
|
| | |
| |
Publicado el 17,enero 2006 - 12:54 |
Hi Peter: I try with your code in the GlobalDeclaration or in the Initialization of the window to test, but always the result is 0. What I am doing badly? Thanks for your patience Guillermo
Yes it does. funcRes is int pclassname is string pwindowName is string=MyWindow..Title funcRes=API ("user32.dll","FindWindowA",0,lpwindowName) Info (funcRes) With API calls don't use String types but Asciiz String types and most of the time use a pointer to the Asciiz string. (the 'lp' prefix of the variable name stands for 'long pointer', see also Hungarian notation. So: funcRes is int asWindowName is ASCIIZ string on 255 lpWindowName is int asWindowName=MyWindow..Title lpWindowName=&asWindowName funcRes=API ("user32.dll","FindWindowA",0,lpWindowName) Info (funcRes) But off course: funcRes=API ("user32.dll","FindWindowA",0,&asWindowName) is also working. -- Peter |
| |
| |
| | | |
|
| | | | |
| | |
|