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


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