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. |