title: How do I call SetWindowLong() in the 64-bit versions of Windows?
body: <p>In the header file <code>WinUser.h</code>, there is a part in which the constants of the second parameter of <a href="http://msdn.microsoft.com/en-us/library/aa926164.aspx" rel="noreferrer"><code>SetWindowLong()</code></a> are defined.</p>
  <pre><code>// ...
  
  #define GWL_WNDPROC         (-4)
  #define GWL_HINSTANCE       (-6)
  #define GWL_HWNDPARENT      (-8)
  #define GWL_STYLE           (-16)
  #define GWL_EXSTYLE         (-20)
  #define GWL_USERDATA        (-21)
  #define GWL_ID              (-12)
  
  #ifdef _WIN64
  
  #undef GWL_WNDPROC
  #undef GWL_HINSTANCE
  #undef GWL_HWNDPARENT
  #undef GWL_USERDATA
  
  #endif /* _WIN64 */
  
  #define GWLP_WNDPROC        (-4)
  #define GWLP_HINSTANCE      (-6)
  #define GWLP_HWNDPARENT     (-8)
  #define GWLP_USERDATA       (-21)
  #define GWLP_ID             (-12)
  
  // ...
  </code></pre>
  <p>But they are right after undefined if <code>_WIN64</code> is defined; and it is defined in my 64-bit system.</p>
  <p>As you see, there is also a <code>GWLP_***</code> set of constants, but they are not documented in the page of <code>SetWindowLong()</code>.</p>
  <p>Why are these constants undefined in x64 systems?<br />
  What is the alternative way of calling <code>SetWindowLong()</code> in x64 systems?</p>
  <hr />
  <p>My system:<br />
  OS: Windows 7 Ultimate x64 SP1<br />
  IDE: Visual Studio 2012 Ultimate Update 3</p>