F-IN-BOX DLL Edition Help >> Extensions >> Functions

FPCSetEventListener

Syntax

[ C++ ]
typedef void (WINAPI *PFLASHPLAYERCONTROLEVENTLISTENER)(HWND hwndFlashPlayerControl, LPARAM lParam, NMHDR* pNMHDR);
BOOL WINAPI FPCSetEventListener(HWND hwndFlashPlayerControl, PFLASHPLAYERCONTROLEVENTLISTENER pListener, LPARAM lParam);

Description

Use FPCSetEventListener to set handler of notifications (instead of handling WM_NOTIFY).

[ C++ ]
FPCSetEventListener(g_hwndFlashPlayerControl, FPCListener, lParam__SomeAdditionalValue);
...
void WINAPI FPCListener(HWND hwndFlashPlayerControl, LPARAM lParam, NMHDR* pNMHDR)
{
    switch (pNMHDR->code)
    {
        case FPCN_FSCOMMAND:
        {
            SFPCFSCommandInfoStruct* pInfo = (SFPCFSCommandInfoStruct*)pNMHDR;
...
            break;
        }

        case FPCN_ONPROGRESS:
        {
            SFPCOnProgressInfoStruct* pInfo = (SFPCOnProgressInfoStruct*)pNMHDR;
...
            break;
        }

        case FPCN_ONREADYSTATECHANGE:
        {
            SFPCOnReadyStateChangeInfoStruct* pInfo = (SFPCOnReadyStateChangeInfoStruct*)pNMHDR;
...
            break;
        }

        case FPCN_LOADEXTERNALRESOURCE:
        {
            SFPCLoadExternalResource* pInfo = (SFPCLoadExternalResource*)pNMHDR;
...
            break;
        }
    }
}


Copyright © Softanics. All rights reserved.
F-IN-BOX is a trademark of Softanics.
Macromedia and Shockwave Flash are trademarks of Adobe