#include <afxwin.h>
#include <vfw.h>
#include "resource.h"
#include "about.h"

// Definizione mappa dei comandi
BEGIN_MESSAGE_MAP(CDialogAbout, CDialog)
	ON_BN_CLICKED(IDC_ANIMAZ, OnAvi)
END_MESSAGE_MAP()

// Funzioni di comando

void CDialogAbout::OnAvi()
{
	HWND hwnd = MCIWndCreate(m_hWnd, AfxGetApp()->m_hInstance, MCIWNDF_NOOPEN|WS_VISIBLE|MCIWNDF_NOMENU|MCIWNDF_NOPLAYBAR, ".\\Fantasy.avi");
	::ShowWindow(hwnd, SW_SHOW);
	MCIWndPlay(hwnd);
	long endofavi = MCIWndGetEnd(hwnd);
	while ( MCIWndGetPosition(hwnd) < endofavi);
	MCIWndDestroy(hwnd);
}
