there is some command like "SwitchtoGDISurface" that lets show windows and have window procedures. A little vague, I know, but I hope it helps. Look at the DirectX object, and then the surface objects. I think it is called "FlipToGDISurface"