![]() ![]() We’re going to dig into Discord Markdown in the next section so you can learn how to properly format all of your messages in any way you’d like. You’ll learn the basics behind Discord’s formatting engine (Markdown & Highlight.js), basic formatting commands (bolding, italicizing, underlining, etc.), and you’ll learn how to type out text in boxes and code blocks - in color! If you’re reading this, you’ve probably been that guy or gal (or you’re trying to avoid all the disappointment and become a Discord text formatting wiz!)Įither way, today I’m going to show you how to type out literally every single format the Discord App offers. ![]() In this guide, we’re going to walk through Discord text formatting in detail, and show you exactly how to color text, bold it, italicize it, and much more! You Can Learn Awesome Discord Text Formatting What kind of Discord command(s) were people using to format their text so nicely? People were typing in underlines, bolded letters, strikethrough text, italics, and even colors within the Discord chat! “How in the world do people type in colors within their Discord message?!”, I thought. If you have any queries regarding the source code, bring them up to me from the comments section.I was a complete newbie back then when I joined my first Discord channel. With this post, I hope you learnt how to change console windows background color in CodeBlocks without using graphics. As you can see, with the function ClearConsoleToColors (int ForgC, int BackC), the background of the console window changed to red with integer values (10,4). Here’s an output screen of what happened in the console window. SetConsoleCursorPosition(hStdOut, coord) ![]() This will set our cursor position for the next print statement This fills the buffer with a given character (in this case 32=space).įillConsoleOutputCharacter(hStdOut, (TCHAR) 32, *, coord, &count) įillConsoleOutputAttribute(hStdOut, csbi.wAttributes, *, coord, &count ) If(GetConsoleScreenBufferInfo(hStdOut, &csbi)) SetConsoleTextAttribute(hStdOut, wColor) Now the current color will be set by this handle It is used here to find the size of the console. This is a structure containing all the console info written anyway (passing NULL causes an access violation). It is not used but we need to capture this since it will be This is a return value indicating how many characterss were written This is used to reset the carat/cursor to the top left. HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE) This is used to get the handle to current output buffer. Void ClearConsoleToColors(int ForgC, int BackC) Void ClearConsoleToColors(int ForgC, int BackC) //function declarationĬlearConsoleToColors(10,4) //function call to change console background color #include //C standard library header file #include //This is the windows header file How to Change Console Windows Background Color in CodeBlocks Without using this function, the background color in console would’ve been default black. You can change your desired console windows color by passing integer values (in the range of 0 to 256) in the ClearConsoleToColors (int ForgC, int BackC) function. Source Code:Ĭurrently the console window background color displayed is Red color. The function void ClearConsoleToColors (int ForgC, int BackC) takes two integer values, and is responsible for the change in the background color of CodeBlocks console window. The source code consists of two header files, windows.h, the header file for windows, and stdio.h, the C standard library header file. The code is written in C language, and I have included comments in the code to help you understand it better. To change the console window background color, simply copy the source code provided here, and compile it in Code::Blocks IDE. This is pretty simple if you’ve already gone through my previous posts. In this tutorial, I will take you through “How to Change Console Windows Background Color in CodeBlocks”. In my earlier tutorials, I took you through how to change text color and text background color in Code::Blocks. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |