Microsoft foundation class
-
Hi, I am making a gui for an application, which requires me to invoke a windows command prompt inside a MFC gui window.I am very new to MFC, I will highly appreciate, if somebody can give an idea, how to invoke a windows command prompt inside a MFC window.
-
Hi, I am making a gui for an application, which requires me to invoke a windows command prompt inside a MFC gui window.I am very new to MFC, I will highly appreciate, if somebody can give an idea, how to invoke a windows command prompt inside a MFC window.
Opening a command prompt window is not related to MFC. It can be performed by any Windows application using ShellExecute[^]:
ShellExecute(NULL, _T("open"), _T("cmd.exe"), _T("/k"), NULL, SW_SHOW);
ShellExecute
starts cmd.exe here which opens the shell. The/k
parameter specifies that the shell is not closed immediately but requires closing the window or typing 'exit' (type 'help cmd' in a shell to list available options). The fifth parameter can be used to specify a directory. -
Hi, I am making a gui for an application, which requires me to invoke a windows command prompt inside a MFC gui window.I am very new to MFC, I will highly appreciate, if somebody can give an idea, how to invoke a windows command prompt inside a MFC window.
-
Opening a command prompt window is not related to MFC. It can be performed by any Windows application using ShellExecute[^]:
ShellExecute(NULL, _T("open"), _T("cmd.exe"), _T("/k"), NULL, SW_SHOW);
ShellExecute
starts cmd.exe here which opens the shell. The/k
parameter specifies that the shell is not closed immediately but requires closing the window or typing 'exit' (type 'help cmd' in a shell to list available options). The fifth parameter can be used to specify a directory.Hi, I want to embedd the command prompt inside a mfc window, can u suggest some template and how to do this. Thanks, Kamlendra
-
Hi, I want to embedd the command prompt inside a mfc window, can u suggest some template and how to do this. Thanks, Kamlendra
Have a look at the article Redirecting an arbitrary Console's Input/Output[^].