title: WINAPI C++ GetDlgItem does not return a valid handle
body: <p>I am trying to get the handle of a child Window by its ID but to do it I have to double cast the ID, otherwise it won't work. Is there other way? What am I missing?</p>
  
  <p>WINAPI x64 C++</p>
  
  <p>Code:</p>
  
  <pre><code>#define BASE_ID 100
  UINT8 i = 1;
  CreateWindow(... (HMENU)BASE_ID + i, ...)
  
  //later in code
  
  HWND hWnd = GetDlgItem(hParent, BASE_ID + i); // This won't work (Returns null handle)
  HWND hWnd = GetDlgItem(hParent, (int)((HMENU)BASE_ID + i)); //Works but I get compiler warning
  </code></pre>