If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

However, this is not your problem. The problem you have is that you are writing onto a DC and therefore using the font selected into that DC. On the Console this DC font is NOT the font that the console uses to display console characters (change ' ' in your code to '@' and see what happens!). So if you persist in using gui functions for the console window then you have a whole lot of more work to do. Use the console supplied functions. They are far easier to use.

The other problem you have is that you assume that each subsequent use of TextOut clears from the screen that which was there before. It doesn't. It writes on top of what was there. So outputing a space over a letter does nothing. Because you haven't selected a correct font to use you only think that TextOut is working properly and the problem is with your EmptyText string. The real problem is with trying to use gui TextOut in the same way as you would output to a console. It doesn't work that way I'm afraid. Once you have your font selected, try outputting a string of A with O as the space character.

Last edited by 2kaud; October 31st, 2013 at 07:18 PM.

All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

However, this is not your problem. The problem you have is that you are writing onto a DC and therefore using the font selected into that DC. On the Console this DC font is NOT the font that the console uses to display console characters (change ' ' in your code to '@' and see what happens!). So if you persist in using gui functions for the console window then you have a whole lot of more work to do. Use the console supplied functions. They are far easier to use.

thanks
i can use the cout with get and set caret functions, but on delay i can lose the caret position when i need ask for name or something... that's why i use TextOut()

Re: error on a code

Try this as a starter for further work. The problem with doing blinking like this is how do you stop it? You start a new thread for each text element you want to blink which will stay blinking until its thread is finished. So to blink say 10 pieces of text on the screen you have 10 threads running with no way of stopping them to turn the blinking off.

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.