WMode

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;
};

Description

Gets or sets WMode.

The WMode property defines how the Flash ActiveX control is rendered:

  • Window — a child window is created with its own HWND (windowed mode).
  • Transparent — windowless mode, allowing rendering over bitmaps with alpha.
  • Opaque — renders the control without transparency.

Although this property can be changed, when using F-IN-BOX you should not set it directly. F-IN-BOX manages it automatically.

Therefore, manually setting WMode is unnecessary and may lead to unexpected behavior.

See also Transparency.

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
    {
        // ...
    }
}