Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 1.36 KB

SetConsoleCursorPosition.md

File metadata and controls

57 lines (37 loc) · 1.36 KB

Home

Function name : SetConsoleCursorPosition

Group: Console - Library: kernel32


The SetConsoleCursorPosition function sets the cursor position in the specified console screen buffer.


Code examples:

Creating a console window for Visual FoxPro application

Declaration:

BOOL SetConsoleCursorPosition(
  HANDLE hConsoleOutput,
  COORD dwCursorPosition
);
  

FoxPro declaration:

DECLARE INTEGER SetConsoleCursorPosition IN kernel32;
	INTEGER hConsoleOutput,;
	SHORT   x,;
	SHORT   y
  

Parameters:

hConsoleOutput [in] Handle to a console screen buffer.

dwCursorPosition [in] A COORD structure that specifies the new cursor position.


Return value:

If the function succeeds, the return value is nonzero.


Comments:

Normally I would declare COORD dwCursorPosition as STRING @dwCursorPosition. It did not work this way. Fortunately SHORT, SHORT does the job.

See also: GetConsoleCursorInfo, GetConsoleScreenBufferInfo, ReadConsole, WriteConsole.