Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Redirecting an arbitrary Console's Input/Output

, 27 Nov 2003
Redirecting an arbitrary console's input/output in a simple, graceful way
// RedirDemoDlg.h : header file
//

#pragma once

#include "DemoRedir.h"

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

// Dialog Data
	enum { IDD = IDD_REDIRDEMO_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;
	CDemoRedirector m_redir;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()

protected:
	CString m_strCommand;
	CString m_strInput;

public:
	afx_msg void OnBnClickedButtonRun();
	afx_msg void OnBnClickedButtonInput();
};

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

Share

About the Author

nickadams
Web Developer
Canada Canada
Nick Adams is one of my favorite figures in Hemingway's stories. I use it because Jeff Lee has been occupied on Codeproject.

| Advertise | Privacy | Mobile
Web02 | 2.8.140814.1 | Last Updated 28 Nov 2003
Article Copyright 2003 by nickadams
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid