title: Convert HWND to Hex String in C++
body: <p>What is the best way to convert <code>HWND</code> to Hex String in C++, I mean also with a <code>"0x"</code> prefix?</p>
  
  <pre><code>HWND hWnd = FindWindow(L"Notepad", L"Untitled - Notepad");
  MessageBox(nullptr, LPCWSTR(hWnd), L"Hello World!", MB_ICONINFORMATION | MB_OK | MB_DEFBUTTON1);
  </code></pre>
  
  <p>But I expect this to output <code>0x00000000</code> (assuming Notepad windows is not open) , but it always returns an empty string.</p>
  
  <p>I also tried <a href="https://stackoverflow.com/questions/5100718/integer-to-hex-string-in-c">this answer</a>, but I ended up with returning <code>0000000000000000</code>.</p>
  
  <p>Anyone can help me on that conversion?</p>