I'm haveing a bit of an issue with the function SetTextColor()..and i'm pretty much lost. I'm getting the errors of "invalid conversion from", and "too few arguments to function `COLORREF".
Heres my code:
Anyone have a clue what i'm doing wrong?Code:/*Headers for this file*/ #include <windows.h> #include <conio.h> /*Namespaces*/ using namespace std; /*Globals*/ HANDLE m_Screen = GetStdHandle(STD_OUTPUT_HANDLE); HANDLE m_Keyboard = GetStdHandle(STD_INPUT_HANDLE); WORD m_TextColor; WORD m_BackgroundColor; /*Console Colors*/ enum ConColor { ConRed = 1, ConGreen = 2, ConBlue = 4 }; int main() { char *title = "WinCon exp."; SetConsoleTitle(title); SetTextColor(ConRed | ConGreen | ConBlue); DWORD Written; char *write = "Hello World!"; WriteConsole(m_Screen, write, strlen(write), &Written, NULL); getch(); return 0; }
*scratches head*..I'm kind of new to all of this stuff, just so you guys know.. starting out on windows.h stuff today.



LinkBack URL
About LinkBacks


