Click here to Skip to main content
15,896,207 members
Articles / Desktop Programming / MFC

Preview and Record with MPEG2 Capture device

Rate me:
Please Sign up or sign in to vote.
4.39/5 (16 votes)
11 Jun 20048 min read 220.1K   9.7K   94  
This article shows how to work with MPEG2 capture devices such as Preview, Record. Works with all video renderers. Grab picture and configure MPEG2 Demux.
#if !defined(AFX_ACTIVE_MOVIE_DLG__91A4E668_3C3A_11D6_97F8_00065B87A69B__INCLUDED_)
#define AFX_ACTIVE_MOVIE_DLG__91A4E668_3C3A_11D6_97F8_00065B87A69B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Settings.h : header file
//

#include "bitmapdialog.h"
#include "MPEG2CaptureApp.h"
#include "MPEG2CaptureAppDlg.h"
#include "resource.h"


class CMPEG2CaptureAppDlg; 
/////////////////////////////////////////////////////////////////////////////
// CActiveWindowDlg dialog

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


	CRect rect1; 


	void OnContextMenu(CWnd*, CPoint point); 


	HACCEL  m_hAccelTable; 

	CPoint m_LastPressDownPoint;
	void   CenterWindow(); 

	int OnCreate(LPCREATESTRUCT lpCreateStruct) ;


// Dialog Data
	//{{AFX_DATA(CActiveWindowDlg)
	enum { IDD = IDD_ACTIVE_WINDOW_DLG };
	//}}AFX_DATA

	CMPEG2CaptureAppDlg  *dlg;
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CActiveWindowDlg)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CActiveWindowDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg void OnAccelEscape();
	afx_msg void OnAccelReturn();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnMove(int x, int y);
	afx_msg void OnAccelGrabPict();
	afx_msg void OnPopupPause();
	afx_msg void OnPopupFullscreen();
	afx_msg void OnAccelPPause();
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnPopupMute();
	afx_msg void OnPopupGrabpicture();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_ACTIVE_MOVIE_DLG__91A4E668_3C3A_11D6_97F8_00065B87A69B__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Israel Israel
Enjoy from Cabelim.com

Comments and Discussions