void GetWindowPos( int *x, int *y ) { RECT rect = { NULL }; if( GetWindowRect( GetConsoleWindow(), &rect ) ) { *x = rect.left; *y = rect.top; } }