RegisterFlashWindowClass

Syntax

BOOL WINAPI RegisterFlashWindowClass();

Description

The RegisterFlashWindowClass function registers a Flash window class using the Flash Player ActiveX (swflash.ocx / flash.ocx) that is installed in the system.

Traditionally, this posed challenges:

  • The Flash ActiveX must be installed and registered before use.
  • Applications had to work with whatever version of Flash ActiveX was already present on the system.
  • There was no easy way to prevent Flash movies from being abused.

FlashPlayerControl solves these problems by providing an alternative: instead of depending solely on the system-installed Flash ActiveX, you can embed the flash.ocx binary into your application's resources and register it dynamically at runtime using RegisterFlashWindowClassEx.

This approach ensures your application can run even when Flash Player ActiveX is not installed on the target machine.

Notes

Use RegisterFlashWindowClass when you want to rely on the Flash ActiveX already registered in the system.

Use RegisterFlashWindowClassEx when you need to bundle your own version of Flash ActiveX (e.g., embedded in resources or provided as a file).