Introduction
This is an application that uses the ZFLASH lib, and I changed some code to render multiple Flash files at the same time.
Sample Project
Step 1: Declare a variable of the CFlashRender
class:
CFlashRender m_FlashRender;
Step 2: Call a function to init Flash and set timer to get a bitmap buffer for rendering the Flash file:
m_FlashRender.InitFlash();
SetTimer(IDTIMER_FLASH, 40, NULL);
Step 3: Load a Flash file to render.
m_FlashRender2.LoadFlash(sFlashFileName);
Step 4: Edit the Timer function:
void CRenderFlashDlg::OnTimer(UINT nIDEvent)
{
if (nIDEvent == IDTIMER_FLASH)
{
m_FlashRender.DrawFrame();
BYTE *pFlashBuffer = m_FlashRender.GetFlashBitmapBuffer();
if (pFlashBuffer)
{
int size = m_FlashRender2.GetFlashBitmapSize();
m_stcFlashRender.ShowImage(pFlashBuffer );
}
}
}