Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. static const HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);`
  2. std::cout.flush();
  3. COORD coord = { (SHORT)x, (SHORT)y };
  4. SetConsoleCursorPosition(hOut, coord);
  5.  
  6. static const HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
  7. std::cout.flush();
  8. SetConsoleCursorPosition(hOut, coord);
  9.  
  10. `static const HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);`
  11.  
  12. `COORD coord;`
  13.  
  14. CONSOLE_SCREEN_BUFFER_INFO cbsi;
  15. if (GetConsoleScreenBufferInfo(hOut, &cbsi))
  16. {
  17. coord = cbsi.dwCursorPosition;
  18. return coord;
  19. }
  20. else
  21. {
  22. // The function failed. Call GetLastError() for details.
  23. COORD invalid = { 0, 0 };
  24. return invalid;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement