Re: Hide Cursor in Console Window

new topic     » goto parent     » topic index » view thread      » older message » newer message
jacques_desch said...

the following code works for me...

It works for me as well. However, removing the extraneous puts() and whiles and wait_keys() causes it not to work.

For instance, this works (code goes right after and replaces all subsequent code after the procedure definition in your code):

puts(1,"a") -- a write to the screen is apparently required in order to set the cursor mode 
ShowConsoleCursor(GetStdHandle(STD_OUTPUT_HANDLE),0)  
while get_key()=-1 do end while 

But without the prior puts(), it does not work on subsequent writes to the screen. For example, this shows the cursor:

-- no write to the screen prior to the following call means 
ShowConsoleCursor(GetStdHandle(STD_OUTPUT_HANDLE),0)  
puts(1,"a") -- the cursor continues to flash hereafter 
while get_key()=-1 do end while 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu