title: IDirectDrawSurface7::Blt returned E_INVALIDARG
body: <p>Step1:</p>
  
  <pre><code>                Image* image = NULL;
                  image = Bitmap::FromFile(m_lpwFPSImagePath[i], TRUE);
  
                  DDSURFACEDESC2    ddsd;
                  DDCOLORKEY          ddck;
                  ZeroMemory( &amp;ddsd, sizeof( ddsd ) );
                  ddsd.dwSize = sizeof( ddsd );
                  ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
                  ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
                  ddsd.dwWidth  = image-&gt;GetWidth();;
                  ddsd.dwHeight = image-&gt;GetHeight();
                  hr = m_pDevice-&gt;CreateSurface(&amp;ddsd, &amp;m_pFPSTexture, NULL );
                  if( hr != DD_OK )
                  {
                      if(hr == DDERR_OUTOFVIDEOMEMORY)
                      {
                          ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN |
                              DDSCAPS_SYSTEMMEMORY;
                          hr = m_pDevice-&gt;CreateSurface(&amp;ddsd, &amp;m_pFPSTexture, NULL );
                      }
                  }
  </code></pre>
  
  <p>Step2:</p>
  
  <p>RECT SrcRect={0,0,fTexWidth,fTexHeight};
          RECT DstRect = {0,0,60,20}; </p>
  
  <pre><code>    hr = m_pPrimarySurf-&gt;Blt(&amp;DstRect,
          m_pFPSTexture,&amp;SrcRect,DDBLT_WAIT,NULL);
  </code></pre>
  
  <p>Note:
  The image size is : 3170 x 64</p>
  
  <p>m_pPrimarySurf->Blt(...) returned E_INVALIDARG . So why ?
  Thx !</p>