)
|
|
C/C++ Quellcode |
1 2 3 4 5 |
//** //* * //* * //* * //** |
|
|
C/C++ Quellcode |
1 |
cout << (unsigned char)178; |


|
|
C/C++ Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
#include <windows.h> #include <iostream> using namespace std; PCONSOLE_FONT_INFOEX testFont; int main() { HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); testFont->dwFontSize.X = 10; testFont->dwFontSize.Y = 20; SetCurrentConsoleFontEx(hOut, TRUE, testFont); cout<<"Hello World"<<endl; getchar(); return 0; } |
Lässt sich nämlich schön in Windows ändern.
jetzt fehlt hald nurmehr das wegen der Schriftgröße
) This post has been edited 1 times, last edit by "Gamemaster1994" (Mar 19th 2011, 8:56pm)

|
|
C/C++ Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
#include <Windows.h> #include <iostream> using namespace std; int main() { HANDLE outcon = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_FONT_INFOEX font; font.cbSize=sizeof(CONSOLE_FONT_INFOEX); GetCurrentConsoleFontEx(outcon, false, &font); font.dwFontSize.X = 10; font.dwFontSize.Y = 10; SetCurrentConsoleFontEx(outcon, false, &font); cout << "Hallo Welt!" << endl; getchar(); return(0); } |

|
|
C/C++ Quellcode |
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 |
#include <Windows.h> #include <iostream> using namespace std; typedef struct _CONSOLE_FONT_INFOEX { ULONG cbSize; DWORD nFont; COORD dwFontSize; UINT FontFamily; UINT FontWeight; WCHAR FaceName[LF_FACESIZE]; } CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX; int main() { HANDLE outcon = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_FONT_INFOEX font; font.cbSize=sizeof(CONSOLE_FONT_INFOEX); GetCurrentConsoleFontEx(outcon, false, &font); font.dwFontSize.X = 25; font.dwFontSize.Y = 25; SetCurrentConsoleFontEx(outcon, false, &font); cout << "Hallo Welt!" << endl; getch(); return(0); } |

|
|
C/C++ Quellcode |
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 |
#include <windows.h> #include <iostream> using namespace std; typedef struct CONSOLE_FONT { DWORD index; COORD dim; } *PCONSOLE_FONT; typedef BOOL (WINAPI *GetConsoleFontInfoFunc)(HANDLE,BOOL,DWORD,PCONSOLE_FONT); typedef COORD (WINAPI *GetConsoleFontSizeFunc)(HANDLE, DWORD); typedef BOOL (WINAPI *GetCurrentConsoleFontFunc)(HANDLE, BOOL, PCONSOLE_FONT); typedef DWORD (WINAPI *GetNumberOfConsoleFontsFunc)(); typedef BOOL (WINAPI *SetConsoleFontFunc)(HANDLE, DWORD); GetConsoleFontInfoFunc pGetConsoleFontInfo; GetConsoleFontSizeFunc pGetConsoleFontSize; GetCurrentConsoleFontFunc pGetCurrentConsoleFont; GetNumberOfConsoleFontsFunc pGetNumberOfConsoleFonts; SetConsoleFontFunc pSetConsoleFont; PCONSOLE_FONT fonts = NULL; int GetAvailableFonts(HANDLE hCon,PCONSOLE_FONT *fonts) { int fontcount = pGetNumberOfConsoleFonts(); *fonts = new CONSOLE_FONT[fontcount]; pGetConsoleFontInfo(hCon,0,fontcount,*fonts); return fontcount; } BOOL SetFont(HANDLE hCon,int index) { if (!pSetConsoleFont(hCon,index)) { return FALSE; } return TRUE; } BOOL Init() { HINSTANCE hLib = NULL; BOOL bRet = TRUE; hLib = LoadLibrary("KERNEL32.DLL"); if (hLib == NULL) { return FALSE; } pGetConsoleFontInfo = (GetConsoleFontInfoFunc)GetProcAddress(hLib,"GetConsoleFontInfo"); pGetConsoleFontSize = (GetConsoleFontSizeFunc)GetProcAddress(hLib,"GetConsoleFontSize"); pGetCurrentConsoleFont = (GetCurrentConsoleFontFunc)GetProcAddress(hLib,"GetCurrentConsoleFont"); pGetNumberOfConsoleFonts = (GetNumberOfConsoleFontsFunc)GetProcAddress(hLib,"GetNumberOfConsoleFonts"); pSetConsoleFont = (SetConsoleFontFunc)GetProcAddress(hLib,"SetConsoleFont"); return bRet; } int main() { PCONSOLE_FONT fonts = NULL; HANDLE hConsole = GetStdHandle( STD_ERROR_HANDLE ); Init(); cout << "Hello World!" << endl; getchar(); return(0); } |