title: What does AFX_MANAGE_STATE(AfxGetStaticModuleState()) do exactly
body: <p>I have used a lot of modal dialogs and they worked fine without the use of <code>AFX_MANAGE_STATE</code>, but recently I was working on a different project in which the resource dlls are different from the launching dll.  I surfed the web and found out the above line and when I inserted it before launching the dialog, it worked.  I guess that maybe since we have different dlls, we need to load the state of the main dll in order to launch the dialog, but I am not sure.  I have not been able to find a good explanation anywhere on the internet.  Could anyone please explain in simple terms what <code>AFX_MANAGE_STATE</code> does and why I suddenly had to use it.</p>
  
  <p>Thanks.</p>