FlashPlayerControl Help
  • Introduction
  • Features
  • How to
    • Embedding swflash.ocx/flash.ocx code into application
    • Loading a movie from a resource
  • Access to Native Flash ActiveX Interface
    • Properties
    • Methods
    • Events
  • Extensions
    • Messages
      • FPCM_LOADMOVIEFROMMEMORY
      • FPCM_PUTMOVIEFROMMEMORY
    • Functions
      • RegisterFlashWindowClass
      • RegisterFlashWindowClassEx
      • UnregisterFlashWindowClassEx
      • GetInstalledFlashVersion
      • GetUsingFlashVersion
    • Notifications
      • FPCN_LOADEXTERNALRESOURCE
  • FAQ
  • License
  • Order
Copyright © 2004 Softanics. All rights reserved.
Delphi is a trademark of Borland Software Corporation.
Macromedia and Shockwave Flash are trademarks of Macromedia, Inc.


Introduction

FlashPlayerControl Help

Introduction

FlashPlayerControl is a window control to enhance Macromedia Flash Player ActiveX features. It does not use its own engine to display movies but provide a wrapper around official swflash.ocx/flash.ocx code instead. Thus it is possible to avoid certain Macromedia Flash Player ActiveX limitations.

Features at a glance

  • Load flash movies from memory directly (no temporary files!).
  • Create flash-enabled applications which are ready to work even when the Macromedia Flash Player ActiveX is not installed!
  • Write code which is compatible with any version of Macromedia Flash Player ActiveX (5, 6, 7).

Do all this and more with... FlashPlayerControl!

Macromedia Flash Player ActiveX 5, 6, 7 are supported.

Load flash movies directly from any source (no temporary files!). Protect your flash movies.

It is known fact that the Flash Player ActiveX is able to load movies at certain URLs only. You have to save the movie to a temporary location from your application's resource before you can load it. You'll have to generate a corresponding link that you can pass to the Flash Player ActiveX and then delete the movie after. You'll have to admit that this is extremely inconvenient. Apart from being inconvenient there is a chance you'll fail when you try to create a temporary file if you don't have the appropriate permission or don't have access to a temporary folder. It is definitely not an appropriate approach when security is an issue since your movie can be easily intercepted. There is a solution! FlashPlayerControl uses a different approach of swflash.ocx/flash.ocx code loading. It is able to load your movies directly to the Macromedia Flash Player ActiveX thereby avoiding the temporary file step. The advantages are pretty obvious. And you can also protect your movies from unauthorized access using your favourite software protection application.

Create flash-enabled applications which are ready to work even when the Macromedia Flash Player ActiveX is not installed!

One of the biggest problem using the Flash Player ActiveX is the mandatory component registration. The common approach is to save swflash.ocx/flash.ocx code to temporary files and then register them. The disadvantages are the same as above mentioned - insufficient permissions to save and register an swflash.ocx/flash.ocx. Now you can forget about these problems! FlashPlayerControl is able to use swflash.ocx/flash.ocx from any source. For example, you can put an swflash.ocx/flash.ocx code inside of your application's resources and instruct FlashPlayerControl to use it. It is important to note that FlashPlayerControl does not use temporary files and swflash.ocx/flash.ocx registration but loads and uses the code directly. No more user management rights problems - no more temporary files and no more component registrations. It is up to you to decide what swflash.ocx/flash.ocx to use - by default already registered component is used.


Features

FlashPlayerControl Help

Features
  • Load flash movies from memory directly (no temporary files!).
  • Create flash-enabled applications which are ready to work even when the Macromedia Flash Player ActiveX is not installed!
  • Write code which is compatible with any version of Macromedia Flash Player ActiveX (5, 6, 7).

Load flash movies from memory directly (no temporary files!)

Using the control you can load any flash movie from memory directly. Just use the FPCM_LOADMOVIEFROMMEMORY and FPCM_PUTMOVIEFROMMEMORY messages. No temporary files! Load any movie on-the-fly from any supported source. For example, you can put one or more flash movies in the resource section of your application and then load it from the exe! That's the portability and power of FlashPlayerControl!

Here's an example of how to load a flash movie from a resource:

#include "FlashPlayerControl.h"

if (!RegisterFlashWindowClass())
    return;

hwndFlashPlayerControl =
    CreateWindow(WC_FLASH,
                 NULL,
                 WS_CHILD | WS_VISIBLE,
                 rc.left,
                 rc.top,
                 rc.right - rc.left,
                 rc.bottom - rc.top,
                 m_hWnd,
                 NULL,
                 hInstance,
                 NULL);

HMODULE hModule = GetModuleHandle(NULL);
HRSRC hResInfo = FindResource(hModule, _T("EmbeddedMovie"), _T("FLASH"));
HGLOBAL hResData = LoadResource(hModule, hResInfo);
LPVOID lpMovieData = LockResource(hResData);
DWORD dwMovieSize = SizeofResource(hModule, hResInfo);

SFPCPutMovieFromMemory sFPCPutMovieFromMemory;

sFPCPutMovieFromMemory.lpData = lpMovieData;
sFPCPutMovieFromMemory.dwSize = dwMovieSize;

::SendMessage(hwndFlashPlayerControl, FPCM_PUTMOVIEFROMMEMORY, 0, (LPARAM)&sFPCPutMovieFromMemory);
Back to Top Back to Top

Create flash-enabled applications which are ready to work even when the Macromedia Flash Player ActiveX is not installed!

Traditionally, there are many obstacles or annoyances that one will encounter when using Macromedia Flash Player ActiveX in an application.

The Application...

  1. needs swflash.ocx/flash.ocx installed in the system before it will work.
  2. has to work flawlessly with the the already installed version of the Macromedia Flash Player ActiveX.
  3. has no easy way to prevent flash movies from being abused.

FlashPlayerControl to the rescue. It solves these problems and more!

By default, the component will use the swflash.ocx/flash.ocx that's already installed on the system. The component can alternatively use any swflash.ocx/flash.ocx that you would like to provide it with using any supported source. An example of this how you can embed the flash.ocx into the resource section of your application's exe file and then load it at runtime. Using this method, your application will work even if the Macromedia Flash Player ActiveX doesn't exist on the target system. Just use RegisterFlashWindowClassEx function! With FlashPlayerControl, hassling around with Macromedia Flash Player ActiveX installation issues are a thing the past! It's so easy to do! There are even demos provided which come complete with source code to prove it!

Here's an example of how to load the swflash.ocx/flash.ocx code from a file:

#include "FlashPlayerControl.h"

...

HANDLE hFile = CreateFile(_T("flash.ocx"),
                          GENERIC_READ,
                          FILE_SHARE_READ,
                          NULL,
                          OPEN_EXISTING,
                          FILE_ATTRIBUTE_NORMAL,
                          NULL);

DWORD dwFlashOCXCodeSize = GetFileSize(hFile, NULL);

HANDLE hFileMapping = CreateFileMapping(hFile,
                                        NULL,
                                        PAGE_READONLY,
                                        0,
                                        dwFlashOCXCodeSize,
                                        NULL);

LPVOID lpFlashOCXCodeData = MapViewOfFile(hFileMapping, FILE_MAP_READ, 0, 0, 0);

if (!RegisterFlashWindowClassEx(lpFlashOCXCodeData, dwFlashOCXCodeSize))
{
    // Error
}

UnmapViewOfFile(lpFlashOCXCodeData);
CloseHandle(hFileMapping);
CloseHandle(hFile);

Here's an example of how to load swflash.ocx/flash.ocx code from a resource:

#include "FlashPlayerControl.h"

...

HMODULE hModule = GetModuleHandle(NULL);
HRSRC hResInfo = FindResource(hModule, _T("FLASHOCXCODE"), _T("BIN"));
HGLOBAL hResData = LoadResource(hModule, hResInfo);
LPVOID lpFlashOCXCodeData = LockResource(hResData);
DWORD dwFlashOCXCodeSize = SizeofResource(hModule, hResInfo);

if (!RegisterFlashWindowClassEx(lpFlashOCXCodeData, dwFlashOCXCodeSize))
   return;
Back to Top Back to Top

Write code which is compatible with any version of Macromedia Flash Player ActiveX (5, 6, 7)

One of the problem with Macromedia Flash Player ActiveX programming is that you have to control what version of the Macromedia Flash Player ActiveX you are using. For example, the property "Stacking" exists only in Macromedia Flash Player ActiveX 5 but doesn't exist in later revisions. FlashPlayerControl automatically detects what Macromedia Flash Player ActiveX version is being used and prevents failure if access to non existant properties / methods is attempted. Applications using FlashPlayerControl are not only compatible with Macromedia Flash Player ActiveX 5, 6, 7, but are also "smart" about how the Macromedia Flash Player ActiveX control is used. This makes your application more robust which can result in fewer technical support issues.

Back to Top Back to Top


How to

FlashPlayerControl Help

How to
  • Embedding swflash.ocx/flash.ocx code into application
  • Loading a movie from a resource


Embedding swflash.ocx/flash.ocx code into application

FlashPlayerControl Help >> How to

Embedding swflash.ocx/flash.ocx code into application

Traditionally, there are many obstacles or annoyances that one will encounter when using Macromedia Flash Player ActiveX in an application.

The Application...

  1. needs swflash.ocx/flash.ocx installed in the system before it will work.
  2. has to work flawlessly with the the already installed version of the Macromedia Flash Player ActiveX.
  3. has no easy way to prevent flash movies from being abused.

FlashPlayerControl to the rescue. It solves these problems and more!

By default, the component will use the swflash.ocx/flash.ocx that's already installed on the system. The component can alternatively use any swflash.ocx/flash.ocx that you would like to provide it with using any supported source. An example of this how you can embed the flash.ocx into the resource section of your application's exe file and then load it at runtime. Using this method, your application will work even if the Macromedia Flash Player ActiveX doesn't exist on the target system. Just use RegisterFlashWindowClassEx function! With FlashPlayerControl, hassling around with Macromedia Flash Player ActiveX installation issues are a thing the past! It's so easy to do! There are even demos provided which come complete with source code to prove it!

Here's an example of how to load the swflash.ocx/flash.ocx code from a file:

#include "FlashPlayerControl.h"

...

HANDLE hFile = CreateFile(_T("flash.ocx"),
                          GENERIC_READ,
                          FILE_SHARE_READ,
                          NULL,
                          OPEN_EXISTING,
                          FILE_ATTRIBUTE_NORMAL,
                          NULL);

DWORD dwFlashOCXCodeSize = GetFileSize(hFile, NULL);

HANDLE hFileMapping = CreateFileMapping(hFile,
                                        NULL,
                                        PAGE_READONLY,
                                        0,
                                        dwFlashOCXCodeSize,
                                        NULL);

LPVOID lpFlashOCXCodeData = MapViewOfFile(hFileMapping, FILE_MAP_READ, 0, 0, 0);

if (!RegisterFlashWindowClassEx(lpFlashOCXCodeData, dwFlashOCXCodeSize))
{
    // Error
}

UnmapViewOfFile(lpFlashOCXCodeData);
CloseHandle(hFileMapping);
CloseHandle(hFile);

Here's an example of how to load swflash.ocx/flash.ocx code from a resource:

#include "FlashPlayerControl.h"

...

HMODULE hModule = GetModuleHandle(NULL);
HRSRC hResInfo = FindResource(hModule, _T("FLASHOCXCODE"), _T("BIN"));
HGLOBAL hResData = LoadResource(hModule, hResInfo);
LPVOID lpFlashOCXCodeData = LockResource(hResData);
DWORD dwFlashOCXCodeSize = SizeofResource(hModule, hResInfo);

if (!RegisterFlashWindowClassEx(lpFlashOCXCodeData, dwFlashOCXCodeSize))
   return;


Loading a movie from a resource

FlashPlayerControl Help >> How to

Loading a movie from a resource

Using the control you can load any flash movie from memory directly. Just use the FPCM_LOADMOVIEFROMMEMORY and FPCM_PUTMOVIEFROMMEMORY No temporary files! Load any movie on-the-fly from any supported source. For example, you can put one or more flash movies in the resource section of your application and then load it from the exe! That's the portability and power of FlashPlayerControl!

Here's an example of how to load a flash movie from a resource:

#include "FlashPlayerControl.h"

// FlashPlayerControl window class registration
if (!RegisterFlashWindowClass())
    return;

// FlashPlayerControl window creating
hwndFlashPlayerControl =
    CreateWindow(WC_FLASH,
                 NULL,
                 WS_CHILD | WS_VISIBLE,
                 rc.left,
                 rc.top,
                 rc.right - rc.left,
                 rc.bottom - rc.top,
                 m_hWnd,
                 NULL,
                 hInstance,
                 NULL);

// Loading flash movie from resources
HMODULE hModule = GetModuleHandle(NULL);
HRSRC hResInfo = FindResource(hModule, _T("EmbeddedMovie"), _T("FLASH"));
HGLOBAL hResData = LoadResource(hModule, hResInfo);
LPVOID lpMovieData = LockResource(hResData);
DWORD dwMovieSize = SizeofResource(hModule, hResInfo);

SFPCPutMovieFromMemory sFPCPutMovieFromMemory;

sFPCPutMovieFromMemory.lpData = lpMovieData;
sFPCPutMovieFromMemory.dwSize = dwMovieSize;

::SendMessage(m_hwndFlashPlayerControl, FPCM_PUTMOVIEFROMMEMORY, 0, (LPARAM)&sFPCPutMovieFromMemory);


Access to Native Flash ActiveX Interface

FlashPlayerControl Help

Access to Native Flash ActiveX Interface
  • Properties
  • Methods
  • Events


Properties

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface

Properties
  • AlignMode
  • AllowScriptAccess
  • BGColor
  • BackgroundColor
  • Base
  • DeviceFont
  • EmbedMovie
  • FlashVars
  • FrameNum
  • Loop
  • Menu
  • Movie
  • MovieData
  • Playing
  • Quality
  • Quality2
  • ReadyState
  • SAlign
  • SWRemote
  • Scale
  • ScaleMode
  • Stacking
  • TotalFrames
  • WMode


AlignMode

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

AlignMode

Description

Integer value from range 0..15. This is the same as SAlign. 0 - no align, 1 - L, 2 - R, 3 - LR, 4 - T, 5 - LT, 6 - TR, 7 - LTR, 8 - B, 9 - LB, 10 - RB, 11 - LRB, 12 - TB, 13 - LTB, 14 - TRB, 15 - LTRB.

Messages

FPCM_GET_ALIGNMODE
FPCM_PUT_ALIGNMODE

Structures

struct SFPCGetAlignMode
{
// [out]
int AlignMode;

// [out]
HRESULT hr;
};

struct SFPCPutAlignMode
{
// [out]
int AlignMode;

// [out]
HRESULT hr;
};

Example

void GetAlignMode(HWND hwndFlashPlayerControl)
{
SFPCGetAlignMode info;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_ALIGNMODE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.AlignMode);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

void PutAlignMode(HWND hwndFlashPlayerControl, int AlignMode)
{
SFPCPutAlignMode info;

info.AlignMode = AlignMode;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_ALIGNMODE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


AllowScriptAccess

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

AllowScriptAccess

Description

Ability to perform outbound scripting from within a SWF. Outbound scripting is achieved through use of FSCommand actions or getURL actions that specify a scripting statement. 'never' - outbound scripting always fails; 'always' - outbound scripting always succeeds.

Messages

FPCM_GET_ALLOWSCRIPTACCESS
FPCM_PUT_ALLOWSCRIPTACCESS

Structures

struct SFPCGetAllowScriptAccess
{
// [in, out]
LPTSTR lpszBuffer;
DWORD dwBufferSize;
// [out]
HRESULT hr;
};

struct SFPCPutAllowScriptAccess
{
// [in]
LPCTSTR lpszBuffer;
// [out]
HRESULT hr;
};

Example

void GetAllowScriptAccess(HWND hwndFlashPlayerControl)
{
SFPCGetAllowScriptAccess info;

info.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_ALLOWSCRIPTACCESS, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_GET_ALLOWSCRIPTACCESS, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.lpszBuffer);
}

void PutAllowScriptAccess(HWND hwndFlashPlayerControl, LPCTSTR AllowScriptAccess)
{
SFPCPutAllowScriptAccess info;

info.lpszBuffer = AllowScriptAccess;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_ALLOWSCRIPTACCESS, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: not supported
6: not supported
7: supported


BGColor

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

BGColor

Description

String value is in format RRGGBB. Value is the same as BackgroundColor.

Messages

FPCM_GET_BGCOLOR
FPCM_PUT_BGCOLOR

Structures

struct SFPCGetBGColor
{
// [in, out]
LPTSTR lpszBuffer;
DWORD dwBufferSize;
// [out]
HRESULT hr;
};

struct SFPCPutBGColor
{
// [in]
LPCTSTR lpszBuffer;
// [out]
HRESULT hr;
};

Example

void GetBGColor(HWND hwndFlashPlayerControl)
{
SFPCGetBGColor info;

info.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_BGCOLOR, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_GET_BGCOLOR, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.lpszBuffer);
}

void PutBGColor(HWND hwndFlashPlayerControl, LPCTSTR BGColor)
{
SFPCPutBGColor info;

info.lpszBuffer = BGColor;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_BGCOLOR, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


BackgroundColor

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

BackgroundColor

Description

Override the background color of a movie. An integer of the form BackgroundColor := red shl 16 + green shl 8 + blue; Use -1 for the default movie color.

Messages

FPCM_GET_BACKGROUNDCOLOR
FPCM_PUT_BACKGROUNDCOLOR

Structures

struct SFPCGetBackgroundColor
{
// [out]
long BackgroundColor;

// [out]
HRESULT hr;
};

struct SFPCPutBackgroundColor
{
// [out]
long BackgroundColor;

// [out]
HRESULT hr;
};

Example

void GetBackgroundColor(HWND hwndFlashPlayerControl)
{
SFPCGetBackgroundColor info;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_BACKGROUNDCOLOR, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.BackgroundColor);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

void PutBackgroundColor(HWND hwndFlashPlayerControl, long BackgroundColor)
{
SFPCPutBackgroundColor info;

info.BackgroundColor = BackgroundColor;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_BACKGROUNDCOLOR, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


Base

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

Base

Description

Specifies the base directory or URL used to resolve all relative path statements in the Flash Player movie. This attribute is helpful when your Flash Player movies are kept in a different directory from your other files.

Messages

FPCM_GET_BASE
FPCM_PUT_BASE

Structures

struct SFPCGetBase
{
// [in, out]
LPTSTR lpszBuffer;
DWORD dwBufferSize;
// [out]
HRESULT hr;
};

struct SFPCPutBase
{
// [in]
LPCTSTR lpszBuffer;
// [out]
HRESULT hr;
};

Example

void GetBase(HWND hwndFlashPlayerControl)
{
SFPCGetBase info;

info.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_BASE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_GET_BASE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.lpszBuffer);
}

void PutBase(HWND hwndFlashPlayerControl, LPCTSTR Base)
{
SFPCPutBase info;

info.lpszBuffer = Base;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_BASE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


DeviceFont

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

DeviceFont

Description

If set to true and the font is installed on the system viewing the Flash movie, the font information installed on the system will be substituted. Text will be aliased (rough) despite the value of the quality attribute. If the font is not installed on the system, the text will come out anti-aliased (smooth) as long as the quality of the movie is set at high.

Messages

FPCM_GET_DEVICEFONT
FPCM_PUT_DEVICEFONT

Structures

struct SFPCGetDeviceFont
{
// [out]
VARIANT_BOOL DeviceFont;

// [out]
HRESULT hr;
};

struct SFPCPutDeviceFont
{
// [out]
VARIANT_BOOL DeviceFont;

// [out]
HRESULT hr;
};

Example

void GetDeviceFont(HWND hwndFlashPlayerControl)
{
SFPCGetDeviceFont info;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_DEVICEFONT, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.DeviceFont);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

void PutDeviceFont(HWND hwndFlashPlayerControl, VARIANT_BOOL DeviceFont)
{
SFPCPutDeviceFont info;

info.DeviceFont = DeviceFont;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_DEVICEFONT, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


EmbedMovie

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

EmbedMovie

Description

Messages

FPCM_GET_EMBEDMOVIE
FPCM_PUT_EMBEDMOVIE

Structures

struct SFPCGetEmbedMovie
{
// [out]
VARIANT_BOOL EmbedMovie;

// [out]
HRESULT hr;
};

struct SFPCPutEmbedMovie
{
// [out]
VARIANT_BOOL EmbedMovie;

// [out]
HRESULT hr;
};

Example

void GetEmbedMovie(HWND hwndFlashPlayerControl)
{
SFPCGetEmbedMovie info;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_EMBEDMOVIE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.EmbedMovie);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

void PutEmbedMovie(HWND hwndFlashPlayerControl, VARIANT_BOOL EmbedMovie)
{
SFPCPutEmbedMovie info;

info.EmbedMovie = EmbedMovie;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_EMBEDMOVIE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


FlashVars

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

FlashVars

Description

Used to send root level variables to the movie. The format of the string is a set of name=value combinations separated by '&'. Browsers will support string sizes of up to 64KB (65535 bytes) in length.

Messages

FPCM_GET_FLASHVARS
FPCM_PUT_FLASHVARS

Structures

struct SFPCGetFlashVars
{
// [in, out]
LPTSTR lpszBuffer;
DWORD dwBufferSize;
// [out]
HRESULT hr;
};

struct SFPCPutFlashVars
{
// [in]
LPCTSTR lpszBuffer;
// [out]
HRESULT hr;
};

Example

void GetFlashVars(HWND hwndFlashPlayerControl)
{
SFPCGetFlashVars info;

info.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_FLASHVARS, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_GET_FLASHVARS, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.lpszBuffer);
}

void PutFlashVars(HWND hwndFlashPlayerControl, LPCTSTR FlashVars)
{
SFPCPutFlashVars info;

info.lpszBuffer = FlashVars;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_FLASHVARS, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: not supported
6: not supported
7: supported


FrameNum

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

FrameNum

Description

The currently displayed frame of the movie. Setting this will advance or rewind the movie.

Messages

FPCM_GET_FRAMENUM
FPCM_PUT_FRAMENUM

Structures

struct SFPCGetFrameNum
{
// [out]
long FrameNum;

// [out]
HRESULT hr;
};

struct SFPCPutFrameNum
{
// [out]
long FrameNum;

// [out]
HRESULT hr;
};

Example

void GetFrameNum(HWND hwndFlashPlayerControl)
{
SFPCGetFrameNum info;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_FRAMENUM, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.FrameNum);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

void PutFrameNum(HWND hwndFlashPlayerControl, long FrameNum)
{
SFPCPutFrameNum info;

info.FrameNum = FrameNum;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_FRAMENUM, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


Loop

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

Loop

Description

True if the animation loops, false to play once.

Messages

FPCM_GET_LOOP
FPCM_PUT_LOOP

Structures

struct SFPCGetLoop
{
// [out]
VARIANT_BOOL Loop;

// [out]
HRESULT hr;
};

struct SFPCPutLoop
{
// [out]
VARIANT_BOOL Loop;

// [out]
HRESULT hr;
};

Example

void GetLoop(HWND hwndFlashPlayerControl)
{
SFPCGetLoop info;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_LOOP, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.Loop);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

void PutLoop(HWND hwndFlashPlayerControl, VARIANT_BOOL Loop)
{
SFPCPutLoop info;

info.Loop = Loop;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_LOOP, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


Menu

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

Menu

Description

Messages

FPCM_GET_MENU
FPCM_PUT_MENU

Structures

struct SFPCGetMenu
{
// [out]
VARIANT_BOOL Menu;

// [out]
HRESULT hr;
};

struct SFPCPutMenu
{
// [out]
VARIANT_BOOL Menu;

// [out]
HRESULT hr;
};

Example

void GetMenu(HWND hwndFlashPlayerControl)
{
SFPCGetMenu info;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_MENU, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.Menu);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

void PutMenu(HWND hwndFlashPlayerControl, VARIANT_BOOL Menu)
{
SFPCPutMenu info;

info.Menu = Menu;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_MENU, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


Movie

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

Movie

Description

The URL or file name source for the Flash Player movie file. Setting this will load a new movie into the control. Notes. 1. Control does not check up the movie changes after loading, so re-loading with the same name is impossible. You should change the movie name or load an empty blank previously. 2. Empty file name raises an exception error.

Messages

FPCM_GET_MOVIE
FPCM_PUT_MOVIE

Structures

struct SFPCGetMovie
{
// [in, out]
LPTSTR lpszBuffer;
DWORD dwBufferSize;
// [out]
HRESULT hr;
};

struct SFPCPutMovie
{
// [in]
LPCTSTR lpszBuffer;
// [out]
HRESULT hr;
};

Example

void GetMovie(HWND hwndFlashPlayerControl)
{
SFPCGetMovie info;

info.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_MOVIE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_GET_MOVIE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.lpszBuffer);
}

void PutMovie(HWND hwndFlashPlayerControl, LPCTSTR Movie)
{
SFPCPutMovie info;

info.lpszBuffer = Movie;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_MOVIE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


MovieData

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

MovieData

Description

Messages

FPCM_GET_MOVIEDATA
FPCM_PUT_MOVIEDATA

Structures

struct SFPCGetMovieData
{
// [in, out]
LPTSTR lpszBuffer;
DWORD dwBufferSize;
// [out]
HRESULT hr;
};

struct SFPCPutMovieData
{
// [in]
LPCTSTR lpszBuffer;
// [out]
HRESULT hr;
};

Example

void GetMovieData(HWND hwndFlashPlayerControl)
{
SFPCGetMovieData info;

info.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_MOVIEDATA, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_GET_MOVIEDATA, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.lpszBuffer);
}

void PutMovieData(HWND hwndFlashPlayerControl, LPCTSTR MovieData)
{
SFPCPutMovieData info;

info.lpszBuffer = MovieData;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_MOVIEDATA, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: not supported
6: not supported
7: supported


Playing

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

Playing

Description

True if the movie is currently playing, false if it is paused.

Messages

FPCM_GET_PLAYING
FPCM_PUT_PLAYING

Structures

struct SFPCGetPlaying
{
// [out]
VARIANT_BOOL Playing;

// [out]
HRESULT hr;
};

struct SFPCPutPlaying
{
// [out]
VARIANT_BOOL Playing;

// [out]
HRESULT hr;
};

Example

void GetPlaying(HWND hwndFlashPlayerControl)
{
SFPCGetPlaying info;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_PLAYING, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.Playing);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

void PutPlaying(HWND hwndFlashPlayerControl, VARIANT_BOOL Playing)
{
SFPCPutPlaying info;

info.Playing = Playing;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_PLAYING, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


Quality

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

Quality

Description

The current rendering quality (0 = Low, 1 = High, 2 = AutoLow, 3 = AutoHigh). This is the same as the Quality2 property.

Messages

FPCM_GET_QUALITY
FPCM_PUT_QUALITY

Structures

struct SFPCGetQuality
{
// [out]
int Quality;

// [out]
HRESULT hr;
};

struct SFPCPutQuality
{
// [out]
int Quality;

// [out]
HRESULT hr;
};

Example

void GetQuality(HWND hwndFlashPlayerControl)
{
SFPCGetQuality info;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_QUALITY, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.Quality);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

void PutQuality(HWND hwndFlashPlayerControl, int Quality)
{
SFPCPutQuality info;

info.Quality = Quality;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_QUALITY, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


Quality2

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

Quality2

Description

The current rendering quality. String: 'Low', 'Hight', 'AutoLow' or 'AutoHight'.

Messages

FPCM_GET_QUALITY2
FPCM_PUT_QUALITY2

Structures

struct SFPCGetQuality2
{
// [in, out]
LPTSTR lpszBuffer;
DWORD dwBufferSize;
// [out]
HRESULT hr;
};

struct SFPCPutQuality2
{
// [in]
LPCTSTR lpszBuffer;
// [out]
HRESULT hr;
};

Example

void GetQuality2(HWND hwndFlashPlayerControl)
{
SFPCGetQuality2 info;

info.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_QUALITY2, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_GET_QUALITY2, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.lpszBuffer);
}

void PutQuality2(HWND hwndFlashPlayerControl, LPCTSTR Quality2)
{
SFPCPutQuality2 info;

info.lpszBuffer = Quality2;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_QUALITY2, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


ReadyState

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

ReadyState

Description

0 = Loading, 1 = Uninitialized, 2 = Loaded, 3 = Interactive, 4 = Complete.

Message

FPCM_GET_READYSTATE

Structure

struct SFPCGetReadyState
{
// [out]
long ReadyState;

// [out]
HRESULT hr;
};

Example

void GetReadyState(HWND hwndFlashPlayerControl)
{
SFPCGetReadyState info;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_READYSTATE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.ReadyState);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

Flash versions

5: supported
6: supported
7: supported


SAlign

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

SAlign

Description

String value is either 'L', 'T', 'R', 'B' or any combination (LR, LT, TR, LTR, LB, RB, LRB, TB, LTB, TRB, LTRB). 'L', 'R', 'T' and 'B' align the movie along the left, right, top or bottom edge, respectively, of the browser window and crop the remaining three sides as needed. 'TL' and 'TR' align the movie to the top left and top right corner, respectively, of the browser window and crop the bottom and remaining right or left side as needed. 'BL' and 'BR' align the movie to the bottom left and bottom right corner, respectively, of the browser window and crop the top and remaining right or left side as needed. See also AlignMode.

Messages

FPCM_GET_SALIGN
FPCM_PUT_SALIGN

Structures

struct SFPCGetSAlign
{
// [in, out]
LPTSTR lpszBuffer;
DWORD dwBufferSize;
// [out]
HRESULT hr;
};

struct SFPCPutSAlign
{
// [in]
LPCTSTR lpszBuffer;
// [out]
HRESULT hr;
};

Example

void GetSAlign(HWND hwndFlashPlayerControl)
{
SFPCGetSAlign info;

info.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_SALIGN, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_GET_SALIGN, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.lpszBuffer);
}

void PutSAlign(HWND hwndFlashPlayerControl, LPCTSTR SAlign)
{
SFPCPutSAlign info;

info.lpszBuffer = SAlign;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_SALIGN, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


SWRemote

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

SWRemote

Description

Messages

FPCM_GET_SWREMOTE
FPCM_PUT_SWREMOTE

Structures

struct SFPCGetSWRemote
{
// [in, out]
LPTSTR lpszBuffer;
DWORD dwBufferSize;
// [out]
HRESULT hr;
};

struct SFPCPutSWRemote
{
// [in]
LPCTSTR lpszBuffer;
// [out]
HRESULT hr;
};

Example

void GetSWRemote(HWND hwndFlashPlayerControl)
{
SFPCGetSWRemote info;

info.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_SWREMOTE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_GET_SWREMOTE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.lpszBuffer);
}

void PutSWRemote(HWND hwndFlashPlayerControl, LPCTSTR SWRemote)
{
SFPCPutSWRemote info;

info.lpszBuffer = SWRemote;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_SWREMOTE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: not supported
7: supported


Scale

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

Scale

Description

String value - 'ShowAll', 'NoBorder', 'ExtractFit', 'NoScale', 'Low', 'AutoLow', 'AutoHight', 'Hight', 'Best', 'AutoMedium', 'Medium'. Show all (default) makes the entire movie visible in the specified area without distortion, while maintaining the original aspect ratio of the movie. Borders may appear on two sides of the movie. No Border scales the movie to fill the specified area, without distortion but possibly with some cropping, while maintaining the original aspect ratio of the movie. Exact Fit makes the entire movie visible in the specified area without trying to preserve the original aspect ratio. Distortion may occur.

Messages

FPCM_GET_SCALE
FPCM_PUT_SCALE

Structures

struct SFPCGetScale
{
// [in, out]
LPTSTR lpszBuffer;
DWORD dwBufferSize;
// [out]
HRESULT hr;
};

struct SFPCPutScale
{
// [in]
LPCTSTR lpszBuffer;
// [out]
HRESULT hr;
};

Example

void GetScale(HWND hwndFlashPlayerControl)
{
SFPCGetScale info;

info.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_SCALE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_GET_SCALE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.lpszBuffer);
}

void PutScale(HWND hwndFlashPlayerControl, LPCTSTR Scale)
{
SFPCPutScale info;

info.lpszBuffer = Scale;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_SCALE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


ScaleMode

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

ScaleMode

Description

Integer value from range 0..10. Value is the same as Scale. 0 - ShowAll, 1 - NoBorder, 2 - ExtractFit, 3 - NoScale, 4 - Low, 5 - AutoLow, 6 - AutoHight, 7 - Hight, 8 - Best, 9 - AutoMedium, 10 - Medium.

Messages

FPCM_GET_SCALEMODE
FPCM_PUT_SCALEMODE

Structures

struct SFPCGetScaleMode
{
// [out]
int ScaleMode;

// [out]
HRESULT hr;
};

struct SFPCPutScaleMode
{
// [out]
int ScaleMode;

// [out]
HRESULT hr;
};

Example

void GetScaleMode(HWND hwndFlashPlayerControl)
{
SFPCGetScaleMode info;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_SCALEMODE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.ScaleMode);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

void PutScaleMode(HWND hwndFlashPlayerControl, int ScaleMode)
{
SFPCPutScaleMode info;

info.ScaleMode = ScaleMode;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_SCALEMODE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


Stacking

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

Stacking

Description

Messages

FPCM_GET_STACKING
FPCM_PUT_STACKING

Structures

struct SFPCGetStacking
{
// [in, out]
LPTSTR lpszBuffer;
DWORD dwBufferSize;
// [out]
HRESULT hr;
};

struct SFPCPutStacking
{
// [in]
LPCTSTR lpszBuffer;
// [out]
HRESULT hr;
};

Example

void GetStacking(HWND hwndFlashPlayerControl)
{
SFPCGetStacking info;

info.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_STACKING, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_GET_STACKING, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.lpszBuffer);
}

void PutStacking(HWND hwndFlashPlayerControl, LPCTSTR Stacking)
{
SFPCPutStacking info;

info.lpszBuffer = Stacking;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_STACKING, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: not supported
7: not supported


TotalFrames

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

TotalFrames

Description

Returns the total number of frames in the movie. This is not available until the movie has loaded. Wait for ReadyState = 4.

Message

FPCM_GET_TOTALFRAMES

Structure

struct SFPCGetTotalFrames
{
// [out]
long TotalFrames;

// [out]
HRESULT hr;
};

Example

void GetTotalFrames(HWND hwndFlashPlayerControl)
{
SFPCGetTotalFrames info;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_TOTALFRAMES, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.TotalFrames);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

Flash versions

5: supported
6: supported
7: supported


WMode

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Properties

WMode

Description

Messages

FPCM_GET_WMODE
FPCM_PUT_WMODE

Structures

struct SFPCGetWMode
{
// [in, out]
LPTSTR lpszBuffer;
DWORD dwBufferSize;
// [out]
HRESULT hr;
};

struct SFPCPutWMode
{
// [in]
LPCTSTR lpszBuffer;
// [out]
HRESULT hr;
};

Example

void GetWMode(HWND hwndFlashPlayerControl)
{
SFPCGetWMode info;

info.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_GET_WMODE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_GET_WMODE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.lpszBuffer);
}

void PutWMode(HWND hwndFlashPlayerControl, LPCTSTR WMode)
{
SFPCPutWMode info;

info.lpszBuffer = WMode;

::SendMessage(hwndFlashPlayerControl, FPCM_PUT_WMODE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


Methods

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface

Methods
  • Back
  • CurrentFrame
  • FlashVersion
  • Forward
  • FrameLoaded
  • GetVariable
  • GotoFrame
  • IsPlaying
  • LoadMovie
  • Pan
  • PercentLoaded
  • Play
  • Rewind
  • SetVariable
  • SetZoomRect
  • Stop
  • StopPlay
  • TCallFrame
  • TCallLabel
  • TCurrentFrame
  • TCurrentLabel
  • TGetProperty
  • TGetPropertyAsNumber
  • TGetPropertyNum
  • TGotoFrame
  • TGotoLabel
  • TPlay
  • TSetProperty
  • TSetPropertyNum
  • TStopPlay
  • Zoom


Back

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

Back

Description

Go to the previous frame.

Message

FPCM_BACK

Structure

struct SFPCBack
{
// [out]
HRESULT hr;
};

Example

void InvokeBack(HWND hwndFlashPlayerControl)
{
SFPCBack info;

::SendMessage(hwndFlashPlayerControl, FPCM_BACK, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


CurrentFrame

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

CurrentFrame

Description

Returns the value number of current frame.

Message

FPCM_CURRENTFRAME

Structure

struct SFPCCurrentFrame
{
// [out]
long Result;

// [out]
HRESULT hr;
};

Example

void InvokeCurrentFrame(HWND hwndFlashPlayerControl)
{
SFPCCurrentFrame info;

::SendMessage(hwndFlashPlayerControl, FPCM_CURRENTFRAME, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.Result);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

Flash versions

5: supported
6: supported
7: supported


FlashVersion

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

FlashVersion

Description

Message

FPCM_FLASHVERSION

Structure

struct SFPCFlashVersion
{
// [out]
long Result;

// [out]
HRESULT hr;
};

Example

void InvokeFlashVersion(HWND hwndFlashPlayerControl)
{
SFPCFlashVersion info;

::SendMessage(hwndFlashPlayerControl, FPCM_FLASHVERSION, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.Result);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

Flash versions

5: supported
6: supported
7: supported


Forward

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

Forward

Description

Go to the next frame.

Message

FPCM_FORWARD

Structure

struct SFPCForward
{
// [out]
HRESULT hr;
};

Example

void InvokeForward(HWND hwndFlashPlayerControl)
{
SFPCForward info;

::SendMessage(hwndFlashPlayerControl, FPCM_FORWARD, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


FrameLoaded

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

FrameLoaded

Description

Message

FPCM_FRAMELOADED

Structure

struct SFPCFrameLoaded
{
// [in]
long FrameNum;

// [out]
VARIANT_BOOL Result;

// [out]
HRESULT hr;
};

Example

void InvokeFrameLoaded(HWND hwndFlashPlayerControl, long FrameNum)
{
SFPCFrameLoaded info;

info.FrameNum = FrameNum;

::SendMessage(hwndFlashPlayerControl, FPCM_FRAMELOADED, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.Result);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

Flash versions

5: supported
6: supported
7: supported


GetVariable

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

GetVariable

Description

Returns the value of the Flash variable specified by name. Raises an exception error if the variable does not exist.

Message

FPCM_GETVARIABLE

Structure

struct SFPCGetVariable
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} name;

// [in, out]
struct
{
LPCTSTR lpszBuffer;
DWORD dwBufferSize;

} Result;

// [out]
HRESULT hr;
};

Example

void InvokeGetVariable(HWND hwndFlashPlayerControl, LPCTSTR name)
{
SFPCGetVariable info;

info.name.lpszBuffer = name;

info.Result.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_GETVARIABLE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.Result.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.Result.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_GETVARIABLE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.Result.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.Result.lpszBuffer);
}

Flash versions

5: supported
6: supported
7: supported


GotoFrame

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

GotoFrame

Description

Activates the frame number specified by FrameNum in the current movie. If the data for a requested frame is not yet available, the player goes to the last frame available and stops, causing unexpected results during playback. The argument FrameNumber is zero-based; that is, frameNumber is 0 in the first frame of the movie, 1 for the second frame, and so on. This differs from the Goto action within Flash, which begins at 1.

Message

FPCM_GOTOFRAME

Structure

struct SFPCGotoFrame
{
// [in]
long FrameNum;

// [out]
HRESULT hr;
};

Example

void InvokeGotoFrame(HWND hwndFlashPlayerControl, long FrameNum)
{
SFPCGotoFrame info;

info.FrameNum = FrameNum;

::SendMessage(hwndFlashPlayerControl, FPCM_GOTOFRAME, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


IsPlaying

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

IsPlaying

Description

Message

FPCM_ISPLAYING

Structure

struct SFPCIsPlaying
{
// [out]
VARIANT_BOOL Result;

// [out]
HRESULT hr;
};

Example

void InvokeIsPlaying(HWND hwndFlashPlayerControl)
{
SFPCIsPlaying info;

::SendMessage(hwndFlashPlayerControl, FPCM_ISPLAYING, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.Result);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

Flash versions

5: supported
6: supported
7: supported


LoadMovie

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

LoadMovie

Description

Loads the movie identified by url to the layer. The argument type is integer for layer and string for url.

Message

FPCM_LOADMOVIE

Structure

struct SFPCLoadMovie
{
// [in]
int layer;
// [in]
struct
{
LPCTSTR lpszBuffer;

} url;

// [out]
HRESULT hr;
};

Example

void InvokeLoadMovie(HWND hwndFlashPlayerControl, int layer, LPCTSTR url)
{
SFPCLoadMovie info;

info.layer = layer;
info.url.lpszBuffer = url;

::SendMessage(hwndFlashPlayerControl, FPCM_LOADMOVIE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


Pan

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

Pan

Description

Pans a zoomed-in movie to the coordinates specified by x and y. Use mode to specify whether the values for x and y are pixels or a percent of the window. Pan does not pan beyond the boundaries of the zoomed-in movie. The argument type for all arguments is integer. The mode can be: 0 = pixels, 1 = % of window.

Message

FPCM_PAN

Structure

struct SFPCPan
{
// [in]
long x;
// [in]
long y;
// [in]
int mode;

// [out]
HRESULT hr;
};

Example

void InvokePan(HWND hwndFlashPlayerControl, long x, long y, int mode)
{
SFPCPan info;

info.x = x;
info.y = y;
info.mode = mode;

::SendMessage(hwndFlashPlayerControl, FPCM_PAN, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


PercentLoaded

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

PercentLoaded

Description

Returns the percent of the Flash Player movie that has streamed into the browser so far; possible values are from 0 to 100.

Message

FPCM_PERCENTLOADED

Structure

struct SFPCPercentLoaded
{
// [out]
long Result;

// [out]
HRESULT hr;
};

Example

void InvokePercentLoaded(HWND hwndFlashPlayerControl)
{
SFPCPercentLoaded info;

::SendMessage(hwndFlashPlayerControl, FPCM_PERCENTLOADED, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.Result);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

Flash versions

5: supported
6: supported
7: supported


Play

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

Play

Description

Starts playing the animation.

Message

FPCM_PLAY

Structure

struct SFPCPlay
{
// [out]
HRESULT hr;
};

Example

void InvokePlay(HWND hwndFlashPlayerControl)
{
SFPCPlay info;

::SendMessage(hwndFlashPlayerControl, FPCM_PLAY, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


Rewind

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

Rewind

Description

Go to the first frame.

Message

FPCM_REWIND

Structure

struct SFPCRewind
{
// [out]
HRESULT hr;
};

Example

void InvokeRewind(HWND hwndFlashPlayerControl)
{
SFPCRewind info;

::SendMessage(hwndFlashPlayerControl, FPCM_REWIND, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


SetVariable

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

SetVariable

Description

Sets the value of the Flash variable specified by name to the value. Type of both arguments is string.

Message

FPCM_SETVARIABLE

Structure

struct SFPCSetVariable
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} name;

// [in]
struct
{
LPCTSTR lpszBuffer;

} value;

// [out]
HRESULT hr;
};

Example

void InvokeSetVariable(HWND hwndFlashPlayerControl, LPCTSTR name, LPCTSTR value)
{
SFPCSetVariable info;

info.name.lpszBuffer = name;
info.value.lpszBuffer = value;

::SendMessage(hwndFlashPlayerControl, FPCM_SETVARIABLE, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


SetZoomRect

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

SetZoomRect

Description

Zoom in on a rectangular area of the movie. Note that the units of the coordinates are in twips (1440 units per inch). To calculate a rectangle in Flash, set the ruler units to Points and multiply the coordinates by 20 to get TWIPS.

Message

FPCM_SETZOOMRECT

Structure

struct SFPCSetZoomRect
{
// [in]
long left;
// [in]
long top;
// [in]
long right;
// [in]
long bottom;

// [out]
HRESULT hr;
};

Example

void InvokeSetZoomRect(HWND hwndFlashPlayerControl, long left, long top, long right, long bottom)
{
SFPCSetZoomRect info;

info.left = left;
info.top = top;
info.right = right;
info.bottom = bottom;

::SendMessage(hwndFlashPlayerControl, FPCM_SETZOOMRECT, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


Stop

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

Stop

Description

Stops playing the movie.

Message

FPCM_STOP

Structure

struct SFPCStop
{
// [out]
HRESULT hr;
};

Example

void InvokeStop(HWND hwndFlashPlayerControl)
{
SFPCStop info;

::SendMessage(hwndFlashPlayerControl, FPCM_STOP, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


StopPlay

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

StopPlay

Description

Stops playing the movie.

Message

FPCM_STOPPLAY

Structure

struct SFPCStopPlay
{
// [out]
HRESULT hr;
};

Example

void InvokeStopPlay(HWND hwndFlashPlayerControl)
{
SFPCStopPlay info;

::SendMessage(hwndFlashPlayerControl, FPCM_STOPPLAY, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


TCallFrame

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

TCallFrame

Description

In the timeline specified by target, executes the action in the frame specified by FrameNum.

Message

FPCM_TCALLFRAME

Structure

struct SFPCTCallFrame
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} target;

// [in]
int FrameNum;

// [out]
HRESULT hr;
};

Example

void InvokeTCallFrame(HWND hwndFlashPlayerControl, LPCTSTR target, int FrameNum)
{
SFPCTCallFrame info;

info.target.lpszBuffer = target;
info.FrameNum = FrameNum;

::SendMessage(hwndFlashPlayerControl, FPCM_TCALLFRAME, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


TCallLabel

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

TCallLabel

Description

In the Timeline indicated by target, executes the action in the frame specified by the label_ frame label. The argument type for both arguments is string.

Message

FPCM_TCALLLABEL

Structure

struct SFPCTCallLabel
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} target;

// [in]
struct
{
LPCTSTR lpszBuffer;

} label;

// [out]
HRESULT hr;
};

Example

void InvokeTCallLabel(HWND hwndFlashPlayerControl, LPCTSTR target, LPCTSTR label)
{
SFPCTCallLabel info;

info.target.lpszBuffer = target;
info.label.lpszBuffer = label;

::SendMessage(hwndFlashPlayerControl, FPCM_TCALLLABEL, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


TCurrentFrame

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

TCurrentFrame

Description

Returns the number of the current frame for the timeline specified by target. The frame number returned is zero-based, meaning frame 1 of the Flash movie would be 0, frame 2 would be 1, and so on. The argument type is string.

Message

FPCM_TCURRENTFRAME

Structure

struct SFPCTCurrentFrame
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} target;

// [out]
long Result;

// [out]
HRESULT hr;
};

Example

void InvokeTCurrentFrame(HWND hwndFlashPlayerControl, LPCTSTR target)
{
SFPCTCurrentFrame info;

info.target.lpszBuffer = target;

::SendMessage(hwndFlashPlayerControl, FPCM_TCURRENTFRAME, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.Result);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

Flash versions

5: supported
6: supported
7: supported


TCurrentLabel

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

TCurrentLabel

Description

Returns the label of the current frame of the timeline specified by target. If there is no current frame label, an empty string is returned. The argument type is string.

Message

FPCM_TCURRENTLABEL

Structure

struct SFPCTCurrentLabel
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} target;

// [in, out]
struct
{
LPCTSTR lpszBuffer;
DWORD dwBufferSize;

} Result;

// [out]
HRESULT hr;
};

Example

void InvokeTCurrentLabel(HWND hwndFlashPlayerControl, LPCTSTR target)
{
SFPCTCurrentLabel info;

info.target.lpszBuffer = target;

info.Result.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_TCURRENTLABEL, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.Result.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.Result.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_TCURRENTLABEL, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.Result.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.Result.lpszBuffer);
}

Flash versions

5: supported
6: supported
7: supported


TGetProperty

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

TGetProperty

Description

Returns a string indicating the value specified by property_ for the timeline indicated by target.

Message

FPCM_TGETPROPERTY

Structure

struct SFPCTGetProperty
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} target;

// [in]
int property;

// [in, out]
struct
{
LPCTSTR lpszBuffer;
DWORD dwBufferSize;

} Result;

// [out]
HRESULT hr;
};

Example

void InvokeTGetProperty(HWND hwndFlashPlayerControl, LPCTSTR target, int property)
{
SFPCTGetProperty info;

info.target.lpszBuffer = target;
info.property = property;

info.Result.lpszBuffer = NULL;

::SendMessage(hwndFlashPlayerControl, FPCM_TGETPROPERTY, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
return;
}

info.Result.lpszBuffer = (TCHAR*)LocalAlloc(LPTR, info.Result.dwBufferSize * sizeof(TCHAR));

::SendMessage(hwndFlashPlayerControl, FPCM_TGETPROPERTY, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
::MessageBox(NULL, info.Result.lpszBuffer, _T("Result"), MB_OK);
}

LocalFree((HLOCAL)info.Result.lpszBuffer);
}

Flash versions

5: supported
6: supported
7: supported


TGetPropertyAsNumber

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

TGetPropertyAsNumber

Description

Returns a number indicating the value specified by property_ for the timeline indicated by target. See TGetProperty.

Message

FPCM_TGETPROPERTYASNUMBER

Structure

struct SFPCTGetPropertyAsNumber
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} target;

// [in]
int property;

// [out]
double Result;

// [out]
HRESULT hr;
};

Example

void InvokeTGetPropertyAsNumber(HWND hwndFlashPlayerControl, LPCTSTR target, int property)
{
SFPCTGetPropertyAsNumber info;

info.target.lpszBuffer = target;
info.property = property;

::SendMessage(hwndFlashPlayerControl, FPCM_TGETPROPERTYASNUMBER, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.Result);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

Flash versions

5: not supported
6: not supported
7: supported


TGetPropertyNum

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

TGetPropertyNum

Description

Message

FPCM_TGETPROPERTYNUM

Structure

struct SFPCTGetPropertyNum
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} target;

// [in]
int property;

// [out]
double Result;

// [out]
HRESULT hr;
};

Example

void InvokeTGetPropertyNum(HWND hwndFlashPlayerControl, LPCTSTR target, int property)
{
SFPCTGetPropertyNum info;

info.target.lpszBuffer = target;
info.property = property;

::SendMessage(hwndFlashPlayerControl, FPCM_TGETPROPERTYNUM, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
TCHAR lpszBuffer[1024];

wsprintf(lpszBuffer, _T("%d"), info.Result);

::MessageBox(NULL, lpszBuffer, _T("Result"), MB_OK);
}
}

Flash versions

5: supported
6: supported
7: supported


TGotoFrame

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

TGotoFrame

Description

For the timeline indicated by target, goes to the frame number specified by frameNumber.

Message

FPCM_TGOTOFRAME

Structure

struct SFPCTGotoFrame
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} target;

// [in]
long FrameNum;

// [out]
HRESULT hr;
};

Example

void InvokeTGotoFrame(HWND hwndFlashPlayerControl, LPCTSTR target, long FrameNum)
{
SFPCTGotoFrame info;

info.target.lpszBuffer = target;
info.FrameNum = FrameNum;

::SendMessage(hwndFlashPlayerControl, FPCM_TGOTOFRAME, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


TGotoLabel

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

TGotoLabel

Description

For the timeline indicated by target, goes to the frame label_ specified by label. The argument type for both arguments is string.

Message

FPCM_TGOTOLABEL

Structure

struct SFPCTGotoLabel
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} target;

// [in]
struct
{
LPCTSTR lpszBuffer;

} label;

// [out]
HRESULT hr;
};

Example

void InvokeTGotoLabel(HWND hwndFlashPlayerControl, LPCTSTR target, LPCTSTR label)
{
SFPCTGotoLabel info;

info.target.lpszBuffer = target;
info.label.lpszBuffer = label;

::SendMessage(hwndFlashPlayerControl, FPCM_TGOTOLABEL, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


TPlay

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

TPlay

Description

Plays the timeline specified by target. The argument type is string.

Message

FPCM_TPLAY

Structure

struct SFPCTPlay
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} target;

// [out]
HRESULT hr;
};

Example

void InvokeTPlay(HWND hwndFlashPlayerControl, LPCTSTR target)
{
SFPCTPlay info;

info.target.lpszBuffer = target;

::SendMessage(hwndFlashPlayerControl, FPCM_TPLAY, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


TSetProperty

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

TSetProperty

Description

For the timeline indicated by target, sets the value of the property specified by property_ to the value. See TGetProperty.

Message

FPCM_TSETPROPERTY

Structure

struct SFPCTSetProperty
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} target;

// [in]
int property;
// [in]
struct
{
LPCTSTR lpszBuffer;

} value;

// [out]
HRESULT hr;
};

Example

void InvokeTSetProperty(HWND hwndFlashPlayerControl, LPCTSTR target, int property, LPCTSTR value)
{
SFPCTSetProperty info;

info.target.lpszBuffer = target;
info.property = property;
info.value.lpszBuffer = value;

::SendMessage(hwndFlashPlayerControl, FPCM_TSETPROPERTY, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


TSetPropertyNum

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

TSetPropertyNum

Description

Message

FPCM_TSETPROPERTYNUM

Structure

struct SFPCTSetPropertyNum
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} target;

// [in]
int property;
// [in]
double value;

// [out]
HRESULT hr;
};

Example

void InvokeTSetPropertyNum(HWND hwndFlashPlayerControl, LPCTSTR target, int property, double value)
{
SFPCTSetPropertyNum info;

info.target.lpszBuffer = target;
info.property = property;
info.value = value;

::SendMessage(hwndFlashPlayerControl, FPCM_TSETPROPERTYNUM, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


TStopPlay

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

TStopPlay

Description

Stops the timeline specified by target. The argument type is string.

Message

FPCM_TSTOPPLAY

Structure

struct SFPCTStopPlay
{
// [in]
struct
{
LPCTSTR lpszBuffer;

} target;

// [out]
HRESULT hr;
};

Example

void InvokeTStopPlay(HWND hwndFlashPlayerControl, LPCTSTR target)
{
SFPCTStopPlay info;

info.target.lpszBuffer = target;

::SendMessage(hwndFlashPlayerControl, FPCM_TSTOPPLAY, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


Zoom

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Methods

Zoom

Description

Zoom the view by a relative scale factor. Zoom(50) will double the size of the objects in the view. Zoom(200) will reduce the size of objects in the view by one half.

Message

FPCM_ZOOM

Structure

struct SFPCZoom
{
// [in]
int factor;

// [out]
HRESULT hr;
};

Example

void InvokeZoom(HWND hwndFlashPlayerControl, int factor)
{
SFPCZoom info;

info.factor = factor;

::SendMessage(hwndFlashPlayerControl, FPCM_ZOOM, 0, (LPARAM)&info);

if FAILED(info.hr)
// Error
{
// ...
}
else
// OK
{
// ...
}
}

Flash versions

5: supported
6: supported
7: supported


Events

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface

Events
  • OnReadyStateChange
  • OnProgress
  • OnFSCommand


OnReadyStateChange

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Events

OnReadyStateChange

Description

Generated when the ready state of the control changes. The possible states are 0=Loading, 1=Uninitialized, 2=Loaded, 3=Interactive, 4=Complete.

Example

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{

...

    case WM_NOTIFY:
    {
        NMHDR* pNMHDR = (NMHDR*)lParam;

        if (hwndFlashPlayerControl == pNMHDR->hwndFrom)
        {
            switch (pNMHDR->code)
            {
                case FPCN_ONREADYSTATECHANGE:
                {
                    SFPCOnReadyStateChangeInfoStruct* pInfo = (SFPCOnReadyStateChangeInfoStruct*)lParam;

                    TCHAR lpszBuffer[1024];
                    _sntprintf(lpszBuffer, sizeof(lpszBuffer) - 1, _T("newState: %d"), pInfo->newState);

                    MessageBox(hWnd, lpszBuffer, _T("OnReadyStateChange()"), MB_OK | MB_ICONINFORMATION);

                    break;
                }
            }
        }
    }
}

Flash versions

5: supported
6: supported
7: supported


OnProgress

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Events

OnProgress

Description

Generated as the Flash Player movie is downloading.

Example

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{

...

    case WM_NOTIFY:
    {
        NMHDR* pNMHDR = (NMHDR*)lParam;

        if (hwndFlashPlayerControl == pNMHDR->hwndFrom)
        {
            switch (pNMHDR->code)
            {
                case FPCN_ONPROGRESS:
                {
                    SFPCOnProgressInfoStruct* pInfo = (SFPCOnProgressInfoStruct*)lParam;

                    TCHAR lpszBuffer[1024];
                    _sntprintf(lpszBuffer, sizeof(lpszBuffer) - 1, _T("percentDone: %d"), pInfo->percentDone);

                    MessageBox(hWnd, lpszBuffer, _T("OnProgress()"), MB_OK | MB_ICONINFORMATION);

                    break;
                }
            }
        }
    }
}

Flash versions

5: supported
6: supported
7: supported


OnFSCommand

FlashPlayerControl Help >> Access to Native Flash ActiveX Interface >> Events

OnFSCommand

Description

This event is generated when a GetURL action is performed in the movie with a URL and the URL starts with "FSCommand:". The portion of the URL after the : is provided in command and the target is provided in args. This can be used to create a response to a frame or button action in the Shockwave Flash movie.

Example

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{

...

    case WM_NOTIFY:
    {
        NMHDR* pNMHDR = (NMHDR*)lParam;

        if (hwndFlashPlayerControl == pNMHDR->hwndFrom)
        {
            switch (pNMHDR->code)
            {
                case FPCN_FSCOMMAND:
                {
                    SFPCFSCommandInfoStruct* pInfo = (SFPCFSCommandInfoStruct*)lParam;

                    MessageBox(hWnd, pInfo->command, _T("FSCommand(): command"), MB_OK | MB_ICONINFORMATION);
                    MessageBox(hWnd, pInfo->args, _T("FSCommand(): args"), MB_OK | MB_ICONINFORMATION);

                    break;
                }
            }
        }
    }
}

Flash versions

5: supported
6: supported
7: supported


Extensions

FlashPlayerControl Help

Extensions
  • Messages
  • Functions
  • Notifications


Messages

FlashPlayerControl Help >> Extensions

Messages
  • FPCM_LOADMOVIEFROMMEMORY
  • FPCM_PUTMOVIEFROMMEMORY


FPCM_LOADMOVIEFROMMEMORY

FlashPlayerControl Help >> Extensions >> Messages

FPCM_LOADMOVIEFROMMEMORY

Description

Loads the movie from memory to the layer.

Message

FPCM_LOADMOVIEFROMMEMORY

Structure

typedef struct SFPCLoadMovieFromMemory
{
// [in]
int layer;

// [in]
LPVOID lpData;
// [in]
DWORD dwSize;

} SFPCLoadMovieFromMemory;

Example

#include "FlashPlayerControl.h"

// FlashPlayerControl window class registration
if (!RegisterFlashWindowClass())
    return;

// FlashPlayerControl window creating
hwndFlashPlayerControl =
    CreateWindow(WC_FLASH,
                 NULL,
                 WS_CHILD | WS_VISIBLE,
                 rc.left,
                 rc.top,
                 rc.right - rc.left,
                 rc.bottom - rc.top,
                 m_hWnd,
                 NULL,
                 hInstance,
                 NULL);

// Loading flash movie from resources
HMODULE hModule = GetModuleHandle(NULL);
HRSRC hResInfo = FindResource(hModule, _T("EmbeddedMovie"), _T("FLASH"));
HGLOBAL hResData = LoadResource(hModule, hResInfo);
LPVOID lpMovieData = LockResource(hResData);
DWORD dwMovieSize = SizeofResource(hModule, hResInfo);

SFCLoadMovieFromMemory sFCLoadMovieFromMemory;

sFCLoadMovieFromMemory.layer = 0;
sFCLoadMovieFromMemory.lpData = lpMovieData;
sFCLoadMovieFromMemory.dwSize = dwMovieSize;

::SendMessage(m_hwndFlashPlayerControl, FCM_LOADMOVIEFROMMEMORY, 0, (LPARAM)&sFCLoadMovieFromMemory);

Flash versions

3: supported
4: supported
5: supported
6: supported
7: supported


FPCM_PUTMOVIEFROMMEMORY

FlashPlayerControl Help >> Extensions >> Messages

FPCM_PUTMOVIEFROMMEMORY

Description

Loads the movie from memory.

Message

FPCM_PUTMOVIEFROMMEMORY

Structure

typedef struct SFPCPutMovieFromMemory
{
// [in]
LPVOID lpData;
// [in]
DWORD dwSize;

} SFPCPutMovieFromMemory;

Example

#include "FlashPlayerControl.h"

// FlashPlayerControl window class registration
if (!RegisterFlashWindowClass())
    return;

// FlashPlayerControl window creating
hwndFlashPlayerControl =
    CreateWindow(WC_FLASH,
                 NULL,
                 WS_CHILD | WS_VISIBLE,
                 rc.left,
                 rc.top,
                 rc.right - rc.left,
                 rc.bottom - rc.top,
                 m_hWnd,
                 NULL,
                 hInstance,
                 NULL);

// Loading flash movie from resources
HMODULE hModule = GetModuleHandle(NULL);
HRSRC hResInfo = FindResource(hModule, _T("EmbeddedMovie"), _T("FLASH"));
HGLOBAL hResData = LoadResource(hModule, hResInfo);
LPVOID lpMovieData = LockResource(hResData);
DWORD dwMovieSize = SizeofResource(hModule, hResInfo);

SFCPutMovieFromMemory sFCPutMovieFromMemory;

sFCPutMovieFromMemory.lpData = lpMovieData;
sFCPutMovieFromMemory.dwSize = dwMovieSize;

::SendMessage(m_hwndFlashPlayerControl, FCM_PUTMOVIEFROMMEMORY, 0, (LPARAM)&sFCPutMovieFromMemory);

Flash versions

3: supported
4: supported
5: supported
6: supported
7: supported


Notifications

FlashPlayerControl Help >> Extensions

Notifications
  • FPCN_LOADEXTERNALRESOURCE


FPCN_LOADEXTERNALRESOURCE

FlashPlayerControl Help >> Extensions >> Notifications

FPCN_LOADEXTERNALRESOURCE

Message

FPCN_LOADEXTERNALRESOURCE

Structure

struct SFPCLoadExternalResource
{
    NMHDR hdr;

    LPCTSTR lpszRelativePath;
    LPSTREAM lpStream;
};

Description

The FPCN_LOADEXTERNALRESOURCE is sent when a movie tries to load an external resource (xml, jpeg, etc.) using a relative path. The message is sent only if the movie is loaded from a stream.

For instance, a movie loads an image using the following code:

loadMovie("images/external_image.jpg", "square");

You can provide the content of this image by handling the notification message FPCN_LOADEXTERNALRESOURCE:

LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    switch (uMsg)
    {

...

            case WM_NOTIFY:
            {
                NMHDR* pNMHDR = (NMHDR*)lParam;

                if (pNMHDR->hwndFrom == g_hwndFlashPlayerControl)
                {
                    switch (pNMHDR->code)
                    {
                        case FPCN_LOADEXTERNALRESOURCE:
                        {
                            SFPCLoadExternalResource* pInfo = (SFPCLoadExternalResource*)lParam;

                            if (0 == lstrcmpi(pInfo->lpszRelativePath, _T("/images/external_image.jpg")))
                            {
                                HMODULE hModule = GetModuleHandle(NULL);
                                HRSRC hResInfo = FindResource(hModule, _T("IMAGE1"), _T("JPEG"));
                                HGLOBAL hResData = LoadResource(hModule, hResInfo);
                                LPVOID lpResourceData = LockResource(hResData);
                                DWORD dwResourceSize = SizeofResource(hModule, hResInfo);

                                ULONG ulWritten;
                                pInfo->lpStream->Write(lpResourceData, dwResourceSize, &ulWritten);
                            }

                            break;
                        }
                    }
                }

                break;
            }

...

}

Flash versions

3: supported
4: supported
5: supported
6: supported
7: supported


Functions

FlashPlayerControl Help >> Extensions

Functions
  • RegisterFlashWindowClass
  • RegisterFlashWindowClassEx
  • UnregisterFlashWindowClassEx
  • GetInstalledFlashVersion
  • GetUsingFlashVersion


RegisterFlashWindowClass

FlashPlayerControl Help >> Extensions >> Functions

RegisterFlashWindowClass

Syntax

BOOL WINAPI RegisterFlashWindowClass();

Description

Traditionally, there are many obstacles or annoyances that one will encounter when using Macromedia Flash Player ActiveX in an application.

The Application...

  1. needs swflash.ocx/flash.ocx installed in the system before it will work.
  2. has to work flawlessly with the the already installed version of the Macromedia Flash Player ActiveX.
  3. has no easy way to prevent flash movies from being abused.

FlashPlayerControl to the rescue. It solves these problems and more!

By default, the component will use the swflash.ocx/flash.ocx that's already installed on the system. The component can alternatively use any swflash.ocx/flash.ocx that you would like to provide it with using any supported source. An example of this how you can embed the flash.ocx into the resource section of your application's exe file and then load it at runtime. Using this method, your application will work even if the Macromedia Flash Player ActiveX doesn't exist on the target system. Just use RegisterFlashWindowClassEx function! With FlashPlayerControl, hassling around with Macromedia Flash Player ActiveX installation issues are a thing the past! It's so easy to do! There are even demos provided which come complete with source code to prove it!

Here's an example of how to load the swflash.ocx/flash.ocx code from a file:

#include "FlashPlayerControl.h"

...

HANDLE hFile = CreateFile(_T("flash.ocx"),
                          GENERIC_READ,
                          FILE_SHARE_READ,
                          NULL,
                          OPEN_EXISTING,
                          FILE_ATTRIBUTE_NORMAL,
                          NULL);

DWORD dwFlashOCXCodeSize = GetFileSize(hFile, NULL);

HANDLE hFileMapping = CreateFileMapping(hFile,
                                        NULL,
                                        PAGE_READONLY,
                                        0,
                                        dwFlashOCXCodeSize,
                                        NULL);

LPVOID lpFlashOCXCodeData = MapViewOfFile(hFileMapping, FILE_MAP_READ, 0, 0, 0);

if (!RegisterFlashWindowClassEx(lpFlashOCXCodeData, dwFlashOCXCodeSize))
{
    // Error
}

UnmapViewOfFile(lpFlashOCXCodeData);
CloseHandle(hFileMapping);
CloseHandle(hFile);

Here's an example of how to load swflash.ocx/flash.ocx code from a resource:

#include "FlashPlayerControl.h"

...

HMODULE hModule = GetModuleHandle(NULL);
HRSRC hResInfo = FindResource(hModule, _T("FLASHOCXCODE"), _T("BIN"));
HGLOBAL hResData = LoadResource(hModule, hResInfo);
LPVOID lpFlashOCXCodeData = LockResource(hResData);
DWORD dwFlashOCXCodeSize = SizeofResource(hModule, hResInfo);

if (!RegisterFlashWindowClassEx(lpFlashOCXCodeData, dwFlashOCXCodeSize))
   return;


RegisterFlashWindowClassEx

FlashPlayerControl Help >> Extensions >> Functions

RegisterFlashWindowClassEx

Syntax

BOOL WINAPI RegisterFlashWindowClassEx(LPVOID lpFlashOCXCodeData, DWORD dwSizeOfFlashOCXCode);

Description

Traditionally, there are many obstacles or annoyances that one will encounter when using Macromedia Flash Player ActiveX in an application.

The Application...

  1. needs swflash.ocx/flash.ocx installed in the system before it will work.
  2. has to work flawlessly with the the already installed version of the Macromedia Flash Player ActiveX.
  3. has no easy way to prevent flash movies from being abused.

FlashPlayerControl to the rescue. It solves these problems and more!

By default, the component will use the swflash.ocx/flash.ocx that's already installed on the system. The component can alternatively use any swflash.ocx/flash.ocx that you would like to provide it with using any supported source. An example of this how you can embed the flash.ocx into the resource section of your application's exe file and then load it at runtime. Using this method, your application will work even if the Macromedia Flash Player ActiveX doesn't exist on the target system. Just use RegisterFlashWindowClassEx function! With FlashPlayerControl, hassling around with Macromedia Flash Player ActiveX installation issues are a thing the past! It's so easy to do! There are even demos provided which come complete with source code to prove it!

Here's an example of how to load the swflash.ocx/flash.ocx code from a file:

#include "FlashPlayerControl.h"

...

HANDLE hFile = CreateFile(_T("flash.ocx"),
                          GENERIC_READ,
                          FILE_SHARE_READ,
                          NULL,
                          OPEN_EXISTING,
                          FILE_ATTRIBUTE_NORMAL,
                          NULL);

DWORD dwFlashOCXCodeSize = GetFileSize(hFile, NULL);

HANDLE hFileMapping = CreateFileMapping(hFile,
                                        NULL,
                                        PAGE_READONLY,
                                        0,
                                        dwFlashOCXCodeSize,
                                        NULL);

LPVOID lpFlashOCXCodeData = MapViewOfFile(hFileMapping, FILE_MAP_READ, 0, 0, 0);

if (!RegisterFlashWindowClassEx(lpFlashOCXCodeData, dwFlashOCXCodeSize))
{
    // Error
}

UnmapViewOfFile(lpFlashOCXCodeData);
CloseHandle(hFileMapping);
CloseHandle(hFile);

Here's an example of how to load swflash.ocx/flash.ocx code from a resource:

#include "FlashPlayerControl.h"

...

HMODULE hModule = GetModuleHandle(NULL);
HRSRC hResInfo = FindResource(hModule, _T("FLASHOCXCODE"), _T("BIN"));
HGLOBAL hResData = LoadResource(hModule, hResInfo);
LPVOID lpFlashOCXCodeData = LockResource(hResData);
DWORD dwFlashOCXCodeSize = SizeofResource(hModule, hResInfo);

if (!RegisterFlashWindowClassEx(lpFlashOCXCodeData, dwFlashOCXCodeSize))
   return;


UnregisterFlashWindowClassEx

FlashPlayerControl Help >> Extensions >> Functions

UnregisterFlashWindowClassEx

Syntax

void WINAPI UnregisterFlashWindowClass();

Description


GetUsingFlashVersion

FlashPlayerControl Help >> Extensions >> Functions

GetUsingFlashVersion

Syntax

DWORD WINAPI GetUsingFlashVersion();

Description

Returns an using version of the Flash.

Here's an example of how to use this function:

#include "FlashPlayerControl.h"

...

DWORD dwUsingFlashVersion = GetUsingFlashVersion();

TCHAR lpszBuffer[1024] = { 0 };

wsprintf(lpszBuffer,
         _T("Using version: %d.%d.%d.%d\n"),
         HIBYTE(HIWORD(dwUsingFlashVersion)),
         LOBYTE(HIWORD(dwUsingFlashVersion)),
         HIBYTE(LOWORD(dwUsingFlashVersion)),
         LOBYTE(LOWORD(dwUsingFlashVersion)));
OutputDebugString(lpszBuffer);


GetInstalledFlashVersion

FlashPlayerControl Help >> Extensions >> Functions

GetInstalledFlashVersion

Syntax

DWORD WINAPI GetInstalledFlashVersion();

Description

Returns an installed version of the Flash.

Here's an example of how to use this function:

#include "FlashPlayerControl.h"

...

DWORD dwInstalledFlashVersion = GetInstalledFlashVersion();

TCHAR lpszBuffer[1024] = { 0 };

wsprintf(lpszBuffer,
         _T("Installed version: %d.%d.%d.%d\n"),
         HIBYTE(HIWORD(dwInstalledFlashVersion)),
         LOBYTE(HIWORD(dwInstalledFlashVersion)),
         HIBYTE(LOWORD(dwInstalledFlashVersion)),
         LOBYTE(LOWORD(dwInstalledFlashVersion)));
OutputDebugString(lpszBuffer);


FAQ

FlashPlayerControl Help

FAQ
  • Does FlashPlayerControl save a flash movie to a temporary file before loading the movie from memory?
  • Does FlashPlayerControl save swflash.ocx/flash.ocx code to a temporary file before loading it from memory?
  • Does FlashPlayerControl use the official Macromedia Flash Player ActiveX code (swflash.ocx/flash.ocx) to show flash movies or not?
  • What versions of the Macromedia Flash Player ActiveX are supported?
  • How do I buy FlashPlayerControl?

Q. Does FlashPlayerControl save a flash movie to a temporary file before loading the movie from memory?

A. No! FlashPlayerControl loads a flash movie directly from memory on-the-fly.

See also:
  • Loading a movie from a resource

Back to Top Back to Top

Q. Does FlashPlayerControl save swflash.ocx/flash.ocx code to a temporary file before loading it from memory?

A. Yes! FlashPlayerControl makes use of the ActiveX player control made by Macromedia.

See also:
  • Embedding swflash.ocx/flash.ocx code into application

Back to Top Back to Top

Q. Does FlashPlayerControl use the official Macromedia Flash Player ActiveX code (swflash.ocx/flash.ocx) to show flash movies or not?

A. Yes! FlashPlayerControl makes use of the ActiveX player control made by Macromedia.

Back to Top Back to Top

Q. What versions of the Macromedia Flash Player ActiveX are supported?

A. Versions 5, 6, 7 are supported now.

Back to Top Back to Top

Q. How do I buy FlashPlayerControl?

A. Please visit Order

Back to Top Back to Top


License

FlashPlayerControl Help

License

THIS IS A CONTRACT. YOU SHOULD CAREFULLY READ ALL THE TERMS AND CONDITIONS BEFORE INSTALLING THIS SOFTWARE. BY INSTALLING THE SOFTWARE, YOU ACCEPT ALL THE TERMS AND CONDITIONS OF THIS LICENSE.

This License Agreement is a legal Agreement between you, an individual or organization, and Softanics.

Subject

The subject of the present Agreement is "FlashPlayerControl" hereinafter mentioned as Software including the whole delivery package, namely the software itself and the covering documentation.

Accepting or rejecting the Agreement

Any usage of this product including installation of the Software or any of its parts on a computer, loading the product into operating memory (RAM) or permanent storage on a computer's disk or other storage medium, as well as any other type of usage means that you accept all the terms and conditions of the present Agreement. If you do not agree with any statement of this License, you should promptly terminate usage of the product and delete all the files referred to it, as its components, so as the results of its work, from your computer. You should also return all the existing mediums containing the Software to the place where you obtained it.

Copyright

This Software is owned by Softanics and is protected by international copyright treaties. Any changes to the Software and its components, any additions to it, including the case of running and executing on your computer any software not built-in into your operating system and affecting the Software's operation or changing its results, as well as storage and distribution of such a changed or augmented Software, are strictly forbidden.

Usage

The Software is licensed by the present Agreement to be used for any commercial and other proper purposes. Applications built using our components are royalties free, but if you need to create a development tool (as DCU, DLL, OCX etc..) integrating this functionality you need to obtain a special license. You acknowledge that the Software in source code form remains a confidential trade secret of Softanics or its suppliers and therefore you agree not to modify the Software or attempt to decipher, decompile, disassemble or reverse engineer the Software. In order to obtain the source codes you should turn to Softanics so as to purchase and register the Software's version including source codes.

Time restriction

This product has no limits in terms of its usage.

Licensed copies number restriction

Single developer license is assigned for installation and execution on one computer assembled as a solitary system units and by one user only. If you have an upgrade to this Software, it constitutes a single product together with the product that you upgraded, and may not be used to increase the total number of licensed installations of the Software. Group programming projects making use of this software must purchase a copy of the software for each member of the group or purchase a Site Developer License. Site Developer License is assigned for installation and execution on unlimited numbers of computers by any user inside any buildings of organization located in one city. Any possible delivery of the product or its parts as well as registration codes or access codes you received with purchasing and/or registering this Software to any individual or organization is strictly prohibited.

Distribution restrictions

Except as provided in this License Agreement, you may not transfer, sell, rent, lease, lend, copy, modify, emulate, clone, decompile, translate, sublicense, time-share or electronically transmit or receive the Software or any of its parts or to distribute it in any other way.

Registration codes and access codes

Registration codes (e.g., serial number) or access codes (e.g. archive file password) you received with purchasing and/or registering this Software are not the subject to the present Agreement. You may store any number of copies of such codes in any form if only you are a registered user and if you obtained them in the registration process or purchasing the Software from Softanics or authorized persons, individuals or organizations. Any distribution or delivery of the registration and access codes to any third party as well as any form of publication is prohibited. The copyright of all registration and access codes remains the property of Softanics which reserves the right to withhold or withdraw authorization of use of all registration codes issued to any user if there is reasonable evidence to indicate that the user is involved in a breach of the terms of this License Agreement.

Modifications to the Software

Softanics reserves the right to change the executable code and to remove, add or change the Software's functions.

Warranty and guarantee

This documentation and the source library are provided "as is" without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or suitability for a particular purpose. The user assumes the entire risk of any damage caused by this software.

Changing terms and conditions of this Agreement

Any variation to the terms of this Agreement shall only be valid if made and delivered by Softanics. If you do not agree to any clause of this Agreement you may ask for explanations from Softanics However, this does not authorize you to consider this Agreement nullified.


Order

FlashPlayerControl Help

Order
Please visit Order Page: http://www.flashplayercontrol.com/dll/order.html