1

I am learning C and I would like to change the terminal properties in a given code of mine. I know that to change the dimensions I can easily use system("mode con:cols=80 lines=30");, for example.

But if, when the code is executed, the user wants to change the size of the window he can just go to the edges and do that, my doubt: is there a way for me to make these dimensions static? without being able to increase or decrease the size of the window.

Rob
  • 14,746
  • 28
  • 47
  • 65
Edssaac
  • 11
  • 2
  • 3
    It's the user's command window, not yours, so yes, they get to resize it. This is also highly OS specific. Is that Windows `mode`? – tadman Nov 13 '20 at 23:28
  • https://stackoverflow.com/questions/41172595/how-to-change-console-window-style-at-runtime? – Ry- Nov 13 '20 at 23:29
  • and what if the user is connecting via a real fixed terminal? Don't resize yourself but adapt to the current terminal's size. That's what TUI apps do – phuclv Nov 14 '20 at 01:10

0 Answers0