OVH Cloud OVH Cloud

console

11 réponses
Avatar
Jean Pierre Daviau
Bonjour à tous, me revoilà

Ça marche. Y a-t-il quelque part du code ou des infos sur console?
J'ai trouvé un bout de code dans Schildt's win95. On part d'où on est
n'est-ce pas?
Donc, mis à part wincon.h, où se cachent les infos là-dessus.
J'ai été sur MSdn. Hum...

--------------------------- extrait ------------
#include <windows.h>
#include <string.h>
#include <stdio.h>

void consol(void);
DWORD result;
COORD coord;
int x=0, y=0;
HANDLE hStdin, hStdout;

int main()
{
hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hStdout, FOREGROUND_INTENSITY | FOREGROUND_GREEN |
FOREGROUND_BLUE);
/* WriteConsole(hStdout, astr, strlen(astr), &result, NULL); */

printf("N'importe quoi.");

return 0;
}

void consol(){

HANDLE hStdin, hStdout;
char str[255] = "This is an example of output to a console.";

int i;

/* free old console and start fresh with new one */
FreeConsole();
AllocConsole();
...


Merci à tous, bonne journée, bonne continuation...


-- -------------------------------
Jean Pierre Daviau
--
http://jeanpierredaviau.com

1 réponse

1 2
Avatar
Jean Pierre Daviau
| MoveWindow(hWnd, 0, 0, 300, 600, 0);

--------------------------------------,repaint
MoveWindow(hWnd, 0, 0, 300, 600, TRUE);
1 2