Mar 29, 2014 at 8:25am
Okay, I made a program which hides the annoying blinking cursor, but it's not working correctly... the cursor is still there.
I tried with Visual Studio and Dev-C++, but the cursor does not hide from the console. Thank you, here's the code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#ifndef _UTILITIES_H_
#define _UTILITIES_H_
#endif
#include <iostream>
#include <conio.h>
#include <windows.h>
using namespace std;
void CursorOff();
void InitProgram()
{
system("color f2");
CursorOff();
cout << "Welcome";
_getch();
}
void CursorOff()
{
HANDLE Handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO lpCursor;
lpCursor.bVisible = false;
SetConsoleCursorInfo(Handle, &lpCursor);
}
|
1 2 3 4 5 6 7 8
|
#include <utilities.h>
int main()
{
InitProgram();
return 0;
}
|
Last edited on Mar 29, 2014 at 8:56am
Mar 29, 2014 at 8:47pm
So, that's what was missing GetConsoleCursorInfo.
Thank you.