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


Copyright © 2004 Softanics. All rights reserved.
Delphi is a trademark of Borland Software Corporation.
Macromedia and Shockwave Flash are trademarks of Macromedia, Inc.