Click here to Skip to main content
15,884,739 members
Articles / Desktop Programming / MFC

Redirecting an Arbitrary Console's Input/Output

Rate me:
Please Sign up or sign in to vote.
4.91/5 (62 votes)
27 Nov 20033 min read 434.9K   15.4K   128  
How to redirect an arbitrary console's input/output in a simple, graceful way
// RedirDemo.h : main header file for the PROJECT_NAME application
//

#pragma once

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"		// main symbols


// CRedirDemoApp:
// See RedirDemo.cpp for the implementation of this class
//

class CRedirDemoApp : public CWinApp
{
public:
	CRedirDemoApp();

// Overrides
	public:
	virtual BOOL InitInstance();

// Implementation

	DECLARE_MESSAGE_MAP()
};

extern CRedirDemoApp theApp;

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.


Written By
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.

Comments and Discussions