Quick question, whats the function to set the console cursor style... (ie: blinking block instead of blinking line)
thanks in advance.
;)
Printable View
Quick question, whats the function to set the console cursor style... (ie: blinking block instead of blinking line)
thanks in advance.
;)
If you're talking about the windows console:
Code:#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
HANDLE hout; //handle to the console
CONSOLE_CURSOR_INFO cursor;//cursor struct
hout = GetStdHandle(STD_OUTPUT_HANDLE);
//set our handle for output
cursor.dwSize = 100;
//the structure member dwsize of
//CONSOLE_CURSOR_INFO takes an int argument
//from 1-100, and the next function uses this
//value to change the size of the cursor
//accordingly
SetConsoleCursorInfo(hout, &cursor);
//pass the cursor info structure and our handle
//to this function and we're done :)
//you can also change the visibility of the cursor
//with the structures other member called bVisible
return 0;
}
Hope this helps, Incvincible
Thanks bud...
In 3 years i never had to changed the console cursor style... haha... too used to win32-GUI and my own home made console routines...