At one time, when I got acquainted with Linux, I was intrigued by the possibility of calling the console in the form in which it was made in numerous games. Examples of such programs include
Guake and
Yakuake . There were no sane options for Windows, so after a while I matured to write my own version.

Remembering that I was not a programmer, but only an ordinary admin, I realized that I wouldn’t be able to write a terminal completely from scratch. Therefore, the logical solution was to use what is - cmd.exe and the native shell from PS.
At first I tried to embed the native shell window into my own, cutting off the boarders and the header, but suddenly it turned out that the terminal emulator behaves not at all like a regular window and when cutting the header (WS_CAPTION) using SetWindowLong (), strange glitches with drawing start . Of the other “bonuses” - WS_VSCROLL is permanently set and not removed, and the size of the window itself cannot be changed pixel-by-pixel, only taking into account the width of the screen buffer and font size.
It became clear that the terminal window would have to be left alone. Then I just decided to move it left-up so that the title and border were not visible, and on the right to cover the border and scroll with another empty window.
')
Total, the logic turned out like this:
- Save the shell process, look for the window handle using GetWindowThreadProcessId ()
- Casting on the SetParent () window
- Shift the window to the left by SM_CXFRAME and up to SM_CYFRAME + SM_CYCAPTION
- Adjust the height of the main window, taking into account the inability to specify the exact size of the terminal
- On the right, we are covering the border and scrolling (optional) with a separate window, shoving HWND_TOP at any drawing
Despite the frank crutches, such a scheme worked quite adequately on everything, starting with Windows XP.
Known bugs:
- Random jambs with drawing in the terminal emulator, until I understood how to treat
- The inability to use the "find" command in the context menu
Download:
setup ,
portable ,
googleTested on Windows XP / Vista / 7/8, cmd, bash and powershell were tested as terminal emulators.
UPD: To specify the font and width of the workspace, you need to run cmd.exe separately, right-click on the header and configure defaults. Alternatively, as
suggested by zzeneg .
Default hotkey for console call -
Ctrl-TABUPD2: I will consider all wishes and will try to implement it in the next big update, after the new year. Well, you know;)
UPD3: New version:
- Partially fixed possible blinking when opening and closing
- rCons will now search for a config first in its own directory, and then in AppData
I will deal with features in the following big update, in short the list is as follows:
1. The ability to set the size of the window horizontally.
2.
Support mintty (
manual )
3. Ability to specify a hot key without a modifier.
I think for now. Thank you all for the feedback and the upcoming! :)