Any other window can be used as a target (or a silver screen, if you like) for playing AVI files: FoxPro form, Windows desktop etc. Use that window handle instead of the handle obtained through the GetActiveWindow in the code above.
Technically, you can even play AVIs on a MessageBox window, once you know its window handle (examples 424 and 434 explain how to obtain such handle).
Note that on the last sample, the DrawFrame method either stops playing the AVI or resumes it from the first sample, depending on the nonstop property.
The set of DrawDib functions used in this example can be substituted with a call to the StretchDIBits.