title: can't make windows common find dialog working
body: <p>I really do not understand these examples from the web. They're all fragmentary. There is nowhere a simple concise example how to make a classic find text dialog.</p>
  
  <p>I put what I know into this , but is is not showing any window and returns: <code>2147500037
  0x80004005</code></p>
  
  <pre><code>#include &lt;windows.h&gt;
  #include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  
  int main() {
    using namespace std;
    UINT uFindReplaceMsg;  // message identifier for FINDMSGSTRING 
    uFindReplaceMsg = RegisterWindowMessage(FINDMSGSTRING);
    wstring search_str = L"text to search";
    HWND findDialog = NULL;
    wchar_t szFindWhat[MAX_PATH];
    FINDREPLACEW fr;
    ZeroMemory( &amp; fr, sizeof( FINDREPLACEW ) );
    fr.lStructSize = sizeof( FINDREPLACEW );
    fr.hwndOwner = NULL;
    fr.lpstrFindWhat = szFindWhat;
    fr.wFindWhatLen = MAX_PATH;
    findDialog = FindTextW(&amp;fr);
    cout &lt;&lt; GetLastError() &lt;&lt; endl;
    cout &lt;&lt; hex &lt;&lt; GetLastError() &lt;&lt; endl;
  }
  </code></pre>
  
  <p>Could you provide me with code that works so I can build from that.</p>