title: how to set image resource path for D3DXCreateTextureFromFileEx method?
body: <p>I try to merge all the image resources to a folder called resource. So, set image path as "resource/" but my directX framework only works if I compile at VS 2010. If I run from the debug folder it cannot run.(I already copy all the image resources to debug folder)</p>
  
  <p><img src="https://i.stack.imgur.com/Shyj7.png" alt="http://i.stack.imgur.com/Shyj7.png"></p>
  
  <pre><code>string folder = "resource/";
  
  void setTexture(LPDIRECT3DTEXTURE9&amp; texture, string imgName, int imgWidth, int imgHeight, D3DCOLOR TransparentColorKey)
  {
      string path;
  
      path = folder + imgName;
  
      //  Create texture.
      hr = D3DXCreateTextureFromFileEx(d3dDevice, path.c_str(), imgWidth, imgHeight, 
          D3DX_DEFAULT, NULL, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, 
          D3DX_DEFAULT, D3DX_DEFAULT, TransparentColorKey, NULL, NULL, &amp;texture);
  }
  </code></pre>