How to display preview window?

Hi ALL

I am making an video streaming application as mine final year project and need a help to know that in MFC we have a function Create() with these following definition:-
_AFXWIN_INLINE BOOL CDialog::Create(UINT nIDTemplate, CWnd* pParentWnd)
{ return CDialog::Create(ATL_MAKEINTRESOURCE(nIDTemplate), pParentWnd); }
i have written my own class like:-
class CDialog : public CWnd
{
public:
CDialog();
void Initialize();

virtual BOOL Create(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);
virtual BOOL Create(UINT nIDTemplate, CWnd* pParentWnd = NULL);
}


And to create a preview window i do like this:-
m_pStreamPreview->Create(IDD_PREVIEW, this);

where:-
CStreamPreview *m_pStreamPreview;
lass CStreamPreview : public CDialog
{
// Construction
public:
CStreamPreview(CWnd* pParent = NULL); // standard constructor



// Dialog Data
//{{AFX_DATA(CStreamPreview)
enum { IDD = IDD_PREVIEW };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA


// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CStreamPreview)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL

// Implementation
protected:

// Generated message map functions
//{{AFX_MSG(CStreamPreview)
virtual BOOL OnInitDialog();
afx_msg void OnClose();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()

};

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

#endif // !defined(AFX_STREAMPREVIEW_H__B67CE2E9_0EAE_4337_ABF1_9D6A4ECCF880__INCLUDED_)


NOW I DON"t want to use the MFC and implementing my program as a service with a gui build in win32 or c sharp and want to know HOW can i display preview window now?




This is MFC version, but can be extremely easy to port it to win32 api.
http://www.codeproject.com/Articles/9140/Saving-a-Drawing-to-a-Bitmap-File

Basically look at GetDC(), CreateCompatibleDC(), BitBlt(), CreateDIBSection(), SelectObject() and WriteDIB() functions.
Topic archived. No new replies allowed.