is there a way to get the titles of all the windows that are currently opened?
I have this code, but somewhy the hWndName value never changes though in userlibs there is just string format for that parameter. I've seen people using this same function, but with pointer to the string. How can i get it to work. It loops through hWnds just fine.
Const GW_HWNDNEXT = 2
Global hWndName% = ""
hWnd = api_GetTopWindow(api_GetDesktopWindow())
Repeat
length% = api_GetWindowTextLength(hWnd) + 4
val% = api_GetWindowText(hWnd, hWndName, length)
DebugLog("WINDOW: " + hWndName)
DebugLog("--- " + hWnd)
hWnd = api_GetNextWindow(hWnd, GW_HWNDNEXT)
Stop
If hWnd = 0 Then Exit
Forever
|