FPCLoadMovieFromResource
Syntax
BOOL WINAPI FPCLoadMovieFromResource(
HWND hwndFlashPlayerControl,
int layer,
HINSTANCE hInstance,
LPCTSTR lpName,
LPCTSTR lpType);
Description
The FPCLoadMovieFromResource
function loads a Flash movie (SWF) from a resource and plays it in the specified layer of the Flash Player control.
This approach allows embedding SWF movies directly into an application’s resources, eliminating the need for external files.
hwndFlashPlayerControl
– handle to the Flash Player control window.
layer
– the layer number where the movie will be loaded (0 for the base layer).
hInstance
– handle to the module containing the resource.
lpName
– name of the resource.
lpType
– type of the resource (e.g., "FLASH").
The function returns TRUE
if successful, or FALSE
if loading fails.
Example
// Load a SWF movie embedded in the application resources
if (!FPCLoadMovieFromResource(hwndFlashPlayerControl,
0,
GetModuleHandle(NULL),
_T("EmbeddedMovie"),
_T("FLASH")))
{
MessageBox(NULL, _T("Failed to load movie from resource"), _T("Error"), MB_OK);
}