Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    [C++] Ridimensionare o aumentare Finestra Dos

    Premetto che sono un principiante

    Per cortesia vi è la possibilità di modificare in + o in - la finestra Dos
    all'apertura'

    Mi visualizza del testo, ma per visionarlo tutto debbo allargare la finestra
    oppure usare la barra di scorrimento.

    Grazie 1000
    a tutti. Saluti Giorgio

  2. #2
    Puoi usare queste API per farlo
    http://msdn.microsoft.com/library/de...windowinfo.asp
    http://msdn.microsoft.com/library/de...buffersize.asp

    codice:
    HANDLE hConOut = GetStdHandle(STD_OUTPUT_HANDLE);
     if(hConOut != INVALID_HANDLE_VALUE)
     {
          SMALL_RECT srWindowRect;     // hold the new console size
          COORD coordScreen;                   // co-ordinates of new window
          coordScreen = GetLargestConsoleWindowSize(hConOut);
    
          // define the new console window size
          // it will be the lesser of 100 * 40 or the largest possible buffer
          srWindowRect.Right = (SHORT) (min(100, coordScreen.X));
          srWindowRect.Bottom = (SHORT) (min(40, coordScreen.Y));
          srWindowRect.Left = srWindowRect.Top = (SHORT) 0;
    
          // keep bigger buffer than window size so that scroll bars appear
          coordScreen.X = 200;
          coordScreen.Y = 200;
    
          SetConsoleScreenBufferSize(hConOut, coordScreen);
          SetConsoleWindowInfo(hConOut, TRUE, &srWindowRect);
     }

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.