title: Win32 - Select Directory Dialog from C/C++
body: <p>How to select an existing folder (or create new) from a native Win32 application?</p>
  
  <p><a href="https://stackoverflow.com/questions/1922204/open-directory-dialog">Here is a similar question</a>. It has a good answer for C#/.NET. But I want the same thing for native Win32.</p>
  
  <p>Anybody knows a solution, free code, etc?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I tried the function from the answer. Everything worked as expected, except it is necessary to call the <code>SHGetPathFromIDList</code> function to retrieve the name of selected directory. Here is a sample screen shot:</p>
  
  <p><img src="https://i.stack.imgur.com/HHPV2.jpg" alt="Example of the directory pickup dialog."></p>