How To Change Dev C++ Background Color

How to change page colorYour program must have a Window Procedure. If you've created child window controls on your main program window, Windows (the Operating System) will send WM_CTLCOLORSTATIC messages to the parent window's Window Procedure. Here is what MSDN says (just as tath told you to look up)...Background

Is there a way to output colored text to the console? I am using Visual Studio 2010, and only need the code to work in Windows. I have been unsuccessful in finding anything except the windows COLOR command, but that changed the color for the entire screen, and I am looking for something that will change only the part I wish to output.



A static control, or an edit control that is read-only or disabled, sends the WM_CTLCOLORSTATIC message to its parent window when the control is about to be drawn. By responding to this message, the parent window can use the specified device context handle to set the text and background colors of the static control.
WM_CTLCOLORSTATIC
hdcStatic = (HDC) wParam; // handle to display context
hwndStatic = (HWND) lParam; // handle to static control
Parameters
hdcStatic
Value of wParam. Handle to the device context for the static control window.
hwndStatic
Value of lParam. Handle to the static control.

C# Console Background Color

You need to handle the WM_CTLCOLORSTATIC message. In doing that you create an HBRUSH of the color you want to color the background of the control. That HBRUSH gets returned by the Window Procedure. As Windows messages go, its a bit unusual. That's why I said its a bit tricky and involved.