Advertisement
Guest User

Untitled

a guest
Jan 6th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nim 0.49 KB | None | 0 0
  1. type
  2.     LPTSTR = uint16
  3.     HWND = int
  4.  
  5. proc EnumWindowsProc(hwnd: HWND, lParam: LPARAM): WINBOOL{.stdcall.}  =
  6.   var window_text: array[256, LPTSTR]
  7.   var window_class_name: array[256, LPTSTR]
  8.   if (IsWindowVisible(hwnd)):
  9.     GetWindowText(hwnd, addr window_text[0], 255);
  10.     GetClassName(hWnd, addr window_class_name[0], 255);
  11.     echo hwnd
  12.     echo "win text"
  13.     echo window_text
  14.     echo window_class_name
  15.   return TRUE
  16.  
  17. EnumWindows((WNDENUMPROC)EnumWindowsProc, LPARAM(0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement