Add idle processing hook; some tweaks to MFC/Windows header use.