www.pudn.com > WmformatScreen.rar > WmScreenDlg.h
// WmScreenDlg.h : header file
//
#if !defined(AFX_WMSCREENDLG_H__0E7C17B6_05C7_4DEC_94F6_1BEA12FB80C9__INCLUDED_)
#define AFX_WMSCREENDLG_H__0E7C17B6_05C7_4DEC_94F6_1BEA12FB80C9__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
const int cPreferredWidth = 640;
const int cPreferredHeight = 480;
#include "CScreenGrabber.h"
/////////////////////////////////////////////////////////////////////////////
// CWmScreenDlg dialog
class CWmScreenDlg : public CDialog
{
// Construction
public:
CWmScreenDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CWmScreenDlg)
enum { IDD = IDD_WMSCREEN_DIALOG };
CButton mButtonStop;
CButton mButtonStart;
CString mTargetFile;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CWmScreenDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
IWMProfileManager * mProfileManager;
WM_MEDIA_TYPE * mScreenMt;
IWMProfile * mProfile;
IWMWriter * mWriter;
UINT mCaptureTimer;
CScreenGrabber mGrabber; // Helper to capture screen
LONG mImageSize; // Screen image size
LONG mSamples; // sample count delivered to the writer
BOOL IsCodecAvailable(GUID inSubtype, WM_MEDIA_TYPE ** outMt);
HRESULT InitAsfWriter(void);
HRESULT GetMediaTypeDetails(IWMMediaProps * pProps, BYTE** outDetails);
HRESULT CreateProfile(IWMProfile ** ppProfile);
HRESULT ConfigInput(IWMWriter* pWriter);
// Generated message map functions
//{{AFX_MSG(CWmScreenDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnButtonStart();
afx_msg void OnButtonStop();
afx_msg void OnDestroy();
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_WMSCREENDLG_H__0E7C17B6_05C7_4DEC_94F6_1BEA12FB80C9__INCLUDED_)