title: Ctypes Get Window Location
body: <p>Is it possible to get the Notepad window location by using Ctypes in Python?</p>
  <pre><code>Python 3.8, OS: Windows 10.
  </code></pre>
  <p>I have tried this code but it did not give location of the window:</p>
  <pre><code>import ctypes
  user32 = ctypes.windll.user32
  handle = user32.FindWindowW(None, u'test - Notepad')
  rect = ctypes.wintypes.RECT()
  ff=ctypes.windll.user32.GetWindowRect(handle, ctypes.pointer(rect))
  print(rect)
  print(ff)
  </code></pre>
  <p>It gives the following output respectively:</p>
  <pre><code>&lt;ctypes.wintypes.RECT object at 0x0000029358dc05c0&gt;
  1
  </code></pre>