FoxPro/Visual FoxPro - Número de Ventana

 
Vista:

Número de Ventana

Publicado por strogoff (2 intervenciones) el 18/06/2001 09:49:01
Estoy intentando desplegar un AVI dentro de una ventana de fox. Quisiera saber como conseguir el nº handle de windows de esta ventana, no el de fox, sin usar el foxtools, a través del API de windows.
Muchas gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Número de Ventana

Publicado por wences (457 intervenciones) el 19/06/2001 19:49:53
podria ser algo asi:

Clea ALL
SET safe off
#DEFINE GW_HWNDFIRST 0
#DEFINE GW_HWNDLAST 1
#DEFINE GW_HWNDNEXT 2
#DEFINE LCMESSAGE 'Press f12 to bring a specific window to the top'
PUBLIC FindWindow,WhowWindow,IsWindowVisible,winhndl,A_HANDLES,hwnd
DECLARE Integer FindWindow in Win32API string cNull, string cWinName
DECLARE Integer ShowWindow in Win32API integer iWinHndl, integer iCond
DECLARE Integer IsWindowVisible in win32Api integer iWinHndl
DECLARE integer BringWindowToTop in Win32API;
integer hwnd
DECLARE integer GetActiveWindow in Win32API
DECLARE integer GetWindow in Win32API;
integer hWnd,;
integer wcCmd
DECLARE integer GetWindowText in Win32API;
integer hWnd,;
string @lpString,;
integer wCmd
HWnd=GetActiveWindow()
LastHWnd=GetActiveWindow()
NextHWnd=GetWindow(HWnd, GW_HWNDNEXT)
CNTR=0
*-loop throught windows until bottom is reached
DO while NextHWnd<>LastHWnd and NextHWnd<>0
*-check title of next window
lpString= Repl(chr(0),80)
LNHANDLE=GetWindowText(NextHWnd, @lpString,80)
IF LEN(ALLT(lpString))>0 AND LEFT(lpString,1)<>CHR(0)
CNTR=CNTR+1
DIMENSION A_HANDLES(CNTR,2)
A_HANDLES(CNTR,1) = PARSETITLE(lpString)
A_HANDLES(CNTR,2) = NextHWnd
ENDIF
NextHWnd=GetWindow(NextHWnd, GW_HWNDNEXT)
ENDDO
CREATE cursor fhandles (fname c(45), fhandle n(10))

FOR i = 1 to alen
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar