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 :: c plus plus 
Cpp :: function overloading in c++ 
Cpp :: c++ compile to exe 
Cpp :: how to use custom array in c++ 
Cpp :: how to download c++ portable compiler 
Cpp :: list in c++ 
Cpp :: C++ continue with for loop 
Cpp :: how to make a comment in c++ 
Cpp :: how to remove first element from vector c++ 
Cpp :: SUMOFPROD2 codechef solution 
Cpp :: c++ move semantics for `this` 
Cpp :: c++ tuple 
Cpp :: vector in c++ 
Cpp :: c++ program to find lcm of two numbers 
Cpp :: length of a string c++ 
Cpp :: c++ vector first element 
Cpp :: stl in c++ 
Cpp :: walk filesystem in c++ 
Cpp :: how to get euler constant in c++ 
Cpp :: create new node in tree 
Cpp :: c++ get active thread count 
Cpp :: Initialize Vector Iterator Through Vector Using Iterators 
Cpp :: sliding window c++ 
Cpp :: prime number program c++ 
Cpp :: C++ rename function 
Cpp :: clear map in C++ 
Cpp :: pointers c++ 
Cpp :: c++ define function pointer 
Cpp :: tr bash 
Cpp :: c++ comment 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =