Very wierd problem..but this code doesn't resize the cursor in my console o.O It compiles and everything but the cursor is normal..like it would be if I didn't resize the cursor..any clues?
Heres my code:
Code:
/*Headers for this file*/
#include <iostream>
#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_CURSOR_INFO curInf;
/*Console Colors*/
enum ConColor
{
ConRed = 1, ConGreen = 2, ConBlue = 4
};
int main()
{
char *title = "WinCon exp.";
SetConsoleTitle(title);
SetConsoleCursorInfo(m_Screen, &curInf);
curInf.dwSize = 100;
curInf.bVisible = FALSE;
SetConsoleTextAttribute(m_Screen, FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_BLUE | FOREGROUND_INTENSITY);
DWORD Written;
char *write = "Hello World!";
WriteConsole(m_Screen, write, strlen(write), &Written, NULL);
getch();
SetConsoleTextAttribute(m_Screen, FOREGROUND_GREEN | BACKGROUND_BLUE);
WriteConsole(m_Screen, write, strlen(write), &Written, NULL);
getch();
return 0;
}
Bit lost on why it doesn't resize it..does SetConsoleTextAttribute() somehow overwrite my changes? o.O