The biggest problem is that VFP does not support call-back functionality when using the WinAPI. EnumWindows can not be used in VFP for this reason.
>What is wrong here
>
>Thanks
>
> DECLARE INTEGER GetWindow IN win32api ;
> INTEGER ncurr_window_handle, ;
> INTEGER ndirection
>
> DECLARE INTEGER GetWindowText IN win32api ;
> INTEGER n_win_handle, ;
> STRING @ cwindow_title, ;
> INTEGER ntitle_length
>
> DECLARE INTEGER EnumWindows IN win32api ;
> INTEGER lpEnumFunc, ;
> INTEGER lparam
>
> ret = EnumWindows(EnumWindowsProc(), 0)
>
>
>FUNCTION EnumWindowsProc(hwnd, lParam)
> ? hwnd
> buffer = SPACE(255)
> cWinCap = GetWindowText(hwnd, buffer, LEN(buffer))
> RETURN 1
>ENDFUNC
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao