flat assembler
Message board for the users of flat assembler.

flat assembler > Windows > console cursor

Author
Thread Post new topic Reply to topic
Ali.A



Joined: 08 Jan 2018
Posts: 139
how can i achieve free / float / roaming cursor, just like the ide shipped with fasm. (can move up, down, right, and left)

there is a way in my mind, but im not sure if its good enough:

loop:
SetConsoleCursorPosition (output handle, coord)
GetAsyncKeyState (left arrow)
if pressed, decrease x coord and jump to loop
GetAsyncKeyState (up arrow)
if pressed, decrease y coord and jump to loop
GetAsyncKeyState (right arrow)
if pressed, increase x coord and jump to loop
GetAsyncKeyState (down arrow)
if pressed, increase y coord and jump to loop

if there is a WINAPI have the same functionality then please let me know about it.

also if you know api's the Gets the current Cursor position please let me know.

thanks.

_________________
Asm For Wise Humans
Post 13 Jul 2018, 07:15
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1258
Location: In a West End town
Ali.A wrote:
if you know api's the Gets the current Cursor position please let me know.


GetConsoleScreenBufferInfo --> Retrieves information about the specified console screen buffer.
Post 14 Jul 2018, 06:04
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2018, Tomasz Grysztar.

Powered by rwasa.