View multiple consoles with your own console emulator

Asked 2 years ago, Updated 2 years ago, 127 views

What should I do if I want to create a console emulator in Windows?
The console emulator here is like ConEmu.
I'm thinking about making my own font because I can't display it neatly with cmd.exe or Powershell.

I would like to implement the tab functionality, but the AllocConsole is determined only once in one process, so I cannot open more than one console.
What should I do?

Also, when I call AllocConsole, a screen similar to cmd.exe appears.
I'd like to implement it myself without displaying it, but is there any way I can't display it properly?
By the way, I use C++

Operating System: Windows 10 1803

c++ windows visual-studio windows-10 console

2022-09-30 19:24

3 Answers

There is a Windows API called SetParent.This allows you to change the parent window for any window, and I think it can be done by specifying the parent window for the window created by AllocConsole as your own app.


2022-09-30 19:24

ConEmu is an open source, so why don't you look at the source?

However, I feel that the approach is somehow wrong.
With software like this, I think you can input and output by using standard input/output and error output pipes.
(That's what I did when I made Cygwin terminal software)

If it's Win32, it's like this.(Only the output)

It may be a little off the mark, but I hope it will be helpful.


2022-09-30 19:24

Do you know a famous open source product called Windows Terminal?

Instead of developing your own terminal software from the beginning, why not start by modifying this Windows Terminal or creating Windows Terminal add-ons?

https://github.com/microsoft/terminal


2022-09-30 19:24

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.