Tested with XP.
This code works here with FW but not with FWH.
FHW: msginfo(cTask) has always the same value.
Regards
Otto
#INCLUDE "BOX.CH"
#INCLUDE "FILEIO.CH"
#INCLUDE "FIVEWIN.CH"
#INCLUDE "FOLDER.CH"
#INCLUDE "INKEY.CH"
#INCLUDE "REPORT.CH"
#define BIF_RETURNONLYFSDIRS 1
#define BIF_DONTGOBELOWDOMAIN 2
#define MAX_PATH 260
#DEFINE SW_MINNOACTIVE 7
#DEFINE INCHES 1
#DEFINE CMETERS 2
#define GHW_HWNDFIRST 0
#define GHW_HWNDNEXT 2
#define GWW_HINSTANCE -6
static oWnd
function Main()
LOCAL oWnd
SET CENTURY ON
SET DELETED on
DEFINE WINDOW oWnd from 1,1 TO 30,60 TITLE "Start";
MENU bldMenu()
ACTIVATE WINDOW oWnd
return nil
function bldMenu()
LOCAL oMenu
MENU oMenu
MENUITEM "Start" ;
ACTION f_code()
ENDMENU
return oMenu
func f_code
LOCAL hWnd := GetWindow( GetActiveWindow(), GHW_HWNDFIRST )
LOCAL cTask := ""
*--------------------------------------------
while hWnd != 0
cTask = GetModuleFileName( GetWindowWord( hWnd, GWW_HINSTANCE ) )
msginfo(cTask)
hWnd = GetWindow( hWnd, GHW_HWNDNEXT )
end
return nil