-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConsole.h
More file actions
72 lines (61 loc) · 2.55 KB
/
Copy pathConsole.h
File metadata and controls
72 lines (61 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// ===========================================================================
/// <summary>
/// Windows's conslole screen manipulations at runtime
/// Console.cpp
/// CplusPlus
/// created by Mehrdad Soleimanimajd on 02.10.2018
/// </summary>
/// <returns></returns>
/// <created>ʆϒʅ, 02.10.2018</created>
/// <changed>ʆϒʅ, 02.07.2023</changed>
// ===========================================================================
#ifndef CONSOLE_H
#define CONSOLE_H
#ifdef _WIN32
#define F_BLACK 0x00
#define F_BLUE 0x01
#define F_GREEN 0x02
#define F_CYAN 0x03
#define F_RED 0x04
#define F_PURPLE 0x05
#define F_YELLOW 0x06
#define F_WHITE 0x07
#define F_bBLACK 0x08
#define F_bBLUE 0X09
#define F_bGREEN 0x0A
#define F_bCYAN 0x0B
#define F_bRED 0x0C
#define F_bPURPLE 0x0D
#define F_bYELLOW 0x0E
#define F_bWHITE 0x0F
#define B_BLACK 0x00
#define B_BLUE 0x10
#define B_GREEN 0x20
#define B_CYAN 0x30
#define B_RED 0x40
#define B_PURPLE 0x50
#define B_YELLOW 0x60
#define B_WHITE 0x70
#define B_bBLACK 0x80
#define B_bBLUE 0X90
#define B_bGREEN 0xA0
#define B_bCYAN 0xB0
#define B_bRED 0xC0
#define B_bPURPLE 0xD0
#define B_bYELLOW 0xE0
#define B_bWHITE 0xF0
// octal (first 15 hexadecimal numbers are for colours)
// numbers after the 15 are for backgrounds
// more numbers also possible which
// reminds of old systems without proper graphic driver
// 0: Black // 1: Blue // 2 : Green // 3 : Cyan // 4 : Red // 5 : Purple // 6 : Yellow // 7 : White // 8 : bright black // 9 : Bright blue // 10 : Bright green // 11 : Bright cyan // 12 : Bright red // 13 : Bright purple // 14 : Bright yellow // 15 : Bright white
void ConsoleFont (const LPCWSTR fontName);
void ConsoleFontSize (const COORD fontSize);
void ConsoleFontColour (const WORD fontColour);
void ConsoleScreenPosition (const COORD screenPosition);
void ConsoleScreenSize (const COORD ColRowCount);
void ConsoleScreenColour (const COLORREF BGcolour);
void ConsoleCursorState (const bool CursorVisibility);
void ColourCouter (const std::string strCharacter, const WORD Colour);
#endif //CONSOLE_H
#endif