title: OPEN FILENAME undefined after including Commdlg.h?
body: <p>I'm working with a brand new, clean install of VS2015.  I'm working on creating a Windows wrapper for some C++ code from another platform.  I'm working on the relatively typical task of opening a file chooser dialog using <code>GetOpenFile</code>.  This requires the use of the <code>OPENFILENAME</code> structure.  I've tried to follow the MSDN example <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms646829(v=vs.85).aspx#open_file" rel="nofollow">here</a>.</p>
  
  <p>For some reason <code>OPENFILENAME</code> is showing:</p>
  
  <blockquote>
    <p>Error: Identifier "OPENFILENAME" is undefined.</p>
  </blockquote>
  
  <p>As you can see below, I have included <code>&lt;Windows.h&gt;</code> and <code>&lt;Commdlg.h&gt;</code>.  What really simple thing am I missing here??  I get the sense that it's a namespace issue, but I can't seem to figure out what the correct namespace would be.</p>
  
  <pre><code>#include "pch.h"
  #include "MainPage.xaml.h"
  #include &lt;Windows.h&gt;
  #include &lt;Commdlg.h&gt;
  
  using namespace App1;
  
  using namespace Platform;
  using namespace Windows::Foundation;
  using namespace Windows::Foundation::Collections;
  using namespace Windows::UI::Xaml;
  using namespace Windows::UI::Xaml::Controls;
  using namespace Windows::UI::Xaml::Controls::Primitives;
  using namespace Windows::UI::Xaml::Data;
  using namespace Windows::UI::Xaml::Input;
  using namespace Windows::UI::Xaml::Media;
  using namespace Windows::UI::Xaml::Navigation;
  
  MainPage::MainPage()
  {
      InitializeComponent();
  }
  
  
  void App1::MainPage::button_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
  {
      OPENFILENAME ofn;   // &lt;-- Syntax/IDE checker highlights as undefined.
  }
  </code></pre>