Bonjour,
j'aimerais pouvoir modifier la taille de la fenêtre de l'émulateur DOS. Connaitriez-vous une fonction le permettant ?
de plus j'aimerais lancer le programme en mode plein écran .
Merci
Version imprimable
Bonjour,
j'aimerais pouvoir modifier la taille de la fenêtre de l'émulateur DOS. Connaitriez-vous une fonction le permettant ?
de plus j'aimerais lancer le programme en mode plein écran .
Merci
Hmm si je me souviens bien tu créer un raccourci de ton exécutable
et dans les propriétés tu peux modifier ce que tu souhaites. :)
Maintenant j'ai déjà posé la question mais sans réponse je crois, je ne
connais pas de code directement pour le comportement d'une fenêtre
DOS :) @++
Est-ce que tu utilise Windows? Si oui, recherche sur la MSDN.
si il pose la question à mon avis c'est qu'il n' a pas trouvé :)
Voila comment j'ai fais pour rechercher sur la msdn (msdn.microsoft.com), et c'est pas sorcier:
- recherche avec "console".
- selection du résultat "console functions".
Ensuite, on arrive sur:
etCitation:
The SetConsoleScreenBufferSize function changes the size of the specified console screen buffer.
BOOL SetConsoleScreenBufferSize(
HANDLE hConsoleOutput,
COORD dwSize
);
Parameters
hConsoleOutput
[in] Handle to a console screen buffer. The handle must have the GENERIC_READ access right. For more information, see Console Buffer Security and Access Rights.
dwSize
[in] A COORD structure that specifies the new size of the console screen buffer, in rows and columns. The specified width and height cannot be less than the width and height of the console screen buffer's window. The specified dimensions also cannot be less than the minimum size allowed by the system. This minimum depends on the current font size for the console (selected by the user) and the SM_CXMIN and SM_CYMIN values returned by the GetSystemMetrics function.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Exemple d'utilisation:Citation:
The GetStdHandle function retrieves a handle for the standard input, standard output, or standard error device.
HANDLE GetStdHandle(
DWORD nStdHandle
);
Parameters
nStdHandle
[in] Standard device for which a handle is to be returned. This parameter can be one of the following values. Value Meaning
STD_INPUT_HANDLE Handle to the standard input device. Initially, this is a handle to the console input buffer, CONIN$.
STD_OUTPUT_HANDLE Handle to the standard output device. Initially, this is a handle to the active console screen buffer, CONOUT$.
STD_ERROR_HANDLE Handle to the standard error device. Initially, this is a handle to the active console screen buffer, CONOUT$.
Return Values
If the function succeeds, the return value is a handle to the specified device, or a redirected handle set by a previous call to SetStdHandle. The handle has GENERIC_READ and GENERIC_WRITE access rights, unless the application has used SetStdHandle to set a standard handle with lesser access.
If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.
If an application does not have associated standard handles, such as a service running on an interactive desktop, and has not redirected them, the return value is NULL.
Code:
1
2
3
4 COORD coords = {50, 50}; SetConsoleScreenBufferSize( GetStdHandle(STD_OUTPUT_HANDLE), coords);
Merci de votre réponse
Mais coords il faut le déclarer ? :)Code:
1
2
3
4 COORD coords = {50, 50}; SetConsoleScreenBufferSize( GetStdHandle(STD_OUTPUT_HANDLE), coords);
Je ne comprend pas la question. Si c'est pour COORD, il faut biensûre inclure <windows.h>
Pour le plein écran :
http://skyscraper.fortunecity.com/gigo/311/winprog/fullscr.txt