// test4Dlg.h : header file
//

#if !defined(AFX_TEST4DLG_H__204E9256_2C8C_4037_824D_0CC21AB9EADC__INCLUDED_)
#define AFX_TEST4DLG_H__204E9256_2C8C_4037_824D_0CC21AB9EADC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CTest4Dlg dialog
#include "Vfw.h"
#include "ximage.h"

#define IFRAME 2
#define PFRAME 1
#define OFRAME 0

typedef struct my_pixel{
	short x;
	short y;
	BYTE r;
	BYTE g;
	BYTE b;
}Pixel;

class CTest4Dlg : public CDialog
{
// Construction
public:
	CTest4Dlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
protected:
	//{{AFX_DATA(CTest4Dlg)
	enum { IDD = IDD_TEST4_DIALOG };
	CButton	m_ButtonStop;
	CButton	m_ButtonPlay;
	CButton	m_ButtonPause;
	CButton	m_ButtonOpen;
	CListBox	m_ListForDebug;
	CSliderCtrl	m_Slider;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTest4Dlg)

	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation

	HICON m_hIcon;
	byte m_byInfOpenedFlag;
	byte m_byBeginFlag;
	byte m_byRedrawingFlag;
	byte m_byPauseFlag;
	char m_strIFrameType[4],m_strPFrameType[4];
	DWORD m_dwFrameNum;
	AVIFILEINFO m_AviFileInfo;
	CxImage m_Ximage;
	CFile m_fileInf;

	void ReadIFrame();
	void ReadPFrame();
	void Read0Frame();
	void SliderChange();

	void Mix2Pic(CxImage *image1, CxImage image2);
	void OnTimer(UINT nIDEvent);
	void ShowImage();
	// Generated message map functions
	//{{AFX_MSG(CTest4Dlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBUTTONopen();
	afx_msg void OnBUTTONplay();
	afx_msg void OnBUTTONpause();
	afx_msg void OnBUTTONstop();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnOriginSize();
	afx_msg void OnOpen();
	afx_msg void OnPause();
	afx_msg void OnPlay();
	afx_msg void OnStop();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TEST4DLG_H__204E9256_2C8C_4037_824D_0CC21AB9EADC__INCLUDED_)
