Search
 
SCRIPT & CODE EXAMPLE
 

CPP

c++ get cursor position console

COORD GetConsoleCursorPosition(HANDLE hConsoleOutput)
{
    CONSOLE_SCREEN_BUFFER_INFO cbsi;
    if (GetConsoleScreenBufferInfo(hConsoleOutput, &cbsi))
    {
        return cbsi.dwCursorPosition;
    }
    else
    {
        // The function failed. Call GetLastError() for details.
        COORD invalid = { 0, 0 };
        return invalid;
    }
}
Comment

How to get cursor position c++

POINT p;
if (GetCursorPos(&p))
{
    //cursor position now in p.x and p.y
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: check if double is integer c++ 
Cpp :: binary search return index c++ 
Cpp :: rotation to vector2 godot 
Cpp :: inserting at start in vector c++ 
Cpp :: how to get mouse position on window sfm; 
Cpp :: how to fix class friendship errors in c++ 
Cpp :: write a code that adds two number 
Cpp :: what are specialized classes c++ 
Cpp :: c++ index of nth occurence 
Cpp :: c++ writing to file 
Cpp :: how to set a string equal to another string cpp 
Cpp :: c++ double to string 
Cpp :: assign a struct to another c++ 
Cpp :: meter espacios en cadena c 
Cpp :: print 5 table in c++ 
Cpp :: sort in descending order c++ stl 
Cpp :: taking input from user in array in c++ 
Cpp :: qt label set text color 
Cpp :: how to display a variable in c++ 
Cpp :: c++ check if file exits 
Cpp :: how to check sqrt of number is integer c++ 
Cpp :: c++ read integers from file 
Cpp :: cin.get vs cin.getline in c++ 
Cpp :: c++ lock 
Cpp :: c++ infinite for loop 
Cpp :: c++ measure time in microseconds 
Cpp :: c++ code for quicksort 
Cpp :: cpp convert vector to set 
Cpp :: c++ check if vector is sorted 
Cpp :: How to reverse a string in c++ using reverse function 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =