title: C++ WinAPI: handling long file paths/names
body: <p>I'm looking at handling longer file paths in my windows application.</p>
  
  <p>Currently, I have a text box (edit box) in which a user can type an absolute file path. I then read that typed file path, using <code>GetWindowText</code>, into a string declared like so: <code>TCHAR FilePath[MAX_PATH];</code></p>
  
  <p>Obviously, here i'm relying on the <code>MAX_PATH</code> constant which limits me to 260 chars. So to handle longer file/paths names could I just extend my TCHAR array like this: <code>TCHAR FilePath[32767];</code>.</p>
  
  <p>Or is there a better way? Could I use a variable length array? (<code>TCHAR FilePath[];</code> is this even possible in C++? - sorry i'm pretty new to this).</p>
  
  <p>Thank you in advanced!</p>
  
  <hr>
  
  <p>Here's the whole code snippet of what i mentioned above:</p>
  
  <pre><code>TCHAR FilePath[MAX_PATH];
  ZeroMemory(&amp;FilePath, sizeof(FilePath));
  GetWindowText(hWndFilePath, FilePath, MAX_PATH);
  </code></pre>