title: MProgressWindow does not refresh in Autodesk Maya API
body: <p>I have an <code>MProgressWindow</code> class reference in Maya/C++. However the window stays at 0% (or even stays blank sometimes) and does not go up. What am I doing wrong?</p>
  
  <pre><code>MProgressWindow P ;
  P.reserve() ;
  P.setProgressMin( 0 ) ;
  P.setProgressMax( 1000 ) ;
  P.startProgress() ;
  
      for (int i = 0; i &lt; 1000; i++ ) {
  
          // do some work
          if ( i % 100 == 0) {
  
              P.setProgressStatus( "Progress "+ MString() + i + "/" + MString() + P.progressMax() ) ;
              P.advanceProgress( 100 ) ;
          }
      }
      P.endProgress() ;
  </code></pre>