Click here to Skip to main content
15,888,527 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 435.5K   15.4K   128  
How to redirect an arbitrary console's input/output in a simple, graceful way
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by RedirDemo.rc
//
#define IDM_ABOUTBOX                    0x0010
#define IDD_ABOUTBOX                    100
#define IDS_ABOUTBOX                    101
#define IDD_REDIRDEMO_DIALOG            102
#define IDR_MAINFRAME                   128
#define IDC_EDIT_CMD                    1000
#define IDC_BUTTON_RUN                  1001
#define IDC_EDIT_OUTPUT                 1002
#define IDC_EDIT_INPUT                  1003
#define IDC_BUTTON_RUN2                 1004
#define IDC_BUTTON_INPUT                1004

// Next default values for new objects
// 
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE        129
#define _APS_NEXT_COMMAND_VALUE         32771
#define _APS_NEXT_CONTROL_VALUE         1003
#define _APS_NEXT_SYMED_VALUE           101
#endif
#endif

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