Click here to Skip to main content
15,884,388 members
Articles / Programming Languages / C++

Real-Time Console Output Redirection

Rate me:
Please Sign up or sign in to vote.
4.81/5 (47 votes)
31 Oct 2006Zlib7 min read 373.8K   5.1K   116  
Console process output flushing is no longer a problem with this little stub.
// DemoDlg.h : header file
//

#if !defined(AFX_DEMODLG_H__6CC4368E_23F2_499D_9223_CD5F2EF43827__INCLUDED_)
#define AFX_DEMODLG_H__6CC4368E_23F2_499D_9223_CD5F2EF43827__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CDemoDlg dialog

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

// Dialog Data
	//{{AFX_DATA(CDemoDlg)
	enum { IDD = IDD_DEMO_DIALOG };
	CEdit	m_log;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CDemoDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnGo();
	afx_msg void OnGo2();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	void Go(LPCTSTR commandLine);
};

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

#endif // !defined(AFX_DEMODLG_H__6CC4368E_23F2_499D_9223_CD5F2EF43827__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, along with any associated source code and files, is licensed under The zlib/libpng License



Comments and Discussions