0

Hello folks!
i am using DEV C++ to code
now i am working at a game in console
and i have a problem with the _setcursortype(_NOCURSOR); function
i set it but the cursor is still like _NORMALCURSOR
in Turbo C works perfectly in DEV not (
i tried to set like this _setcursortype(0); also don't have effect

i am just wondering if there is another alternative way to remove cursor from console?
my game looks very bad with the cursor active

pls help
thx in advance

Edited by thendrluca

2
Contributors
2
Replies
6
Views
4 Years
Discussion Span
Last Post by thendrluca
0

Alternative for _setcursortype(_NOCURSOR);

void ShowCursor(bool show) {
    HANDLE hConsoleOutput;
    CONSOLE_CURSOR_INFO structCursorInfo;

    hConsoleOutput = GetStdHandle( STD_OUTPUT_HANDLE );

    GetConsoleCursorInfo( hConsoleOutput, &structCursorInfo );

    structCursorInfo.bVisible = show;

    SetConsoleCursorInfo( hConsoleOutput,
    &structCursorInfo );

}

in program tu use like this
ShowCursor(false);

My question, my answer..very active users )

Edited by thendrluca

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.