[try Beta version]
Not logged in

 
deleting a portion of screen

Jul 11, 2011 at 4:34pm
how can we delete a portion of screen on c++ program?i tried using \b and overwriting the line but it didnt help
Jul 11, 2011 at 4:44pm
ummm how about adding

system("@echooff");

or

system("@Echooff");
Jul 11, 2011 at 4:46pm
@ Justin: You forgot a space there. Also it's not quite what they are asking

@ OP: Are we working with a console? Because if that's the case you won't be able to delete an actual portion of the screen. You will need to redraw the whole thing, which isn't as hard as it seems. But before we got there can I get a little more detail? What are you trying to do?
Jul 11, 2011 at 4:54pm
i am asking the user to enter his name first.then asking him to enter his birhtplace.and then birthday....if the date entered is not valid(some thing like 43/6/2011,i want the user to re-enter his birthdaywithout proceeding next....i dont want to clear the screen at this moment nor do i want him to enter the previous data(ie name and birthplace)...i just want to clear the wrong date and not proceed untill the user enters a valid date
Jul 11, 2011 at 5:03pm
You'll have to gotoxy() the place you wish to overwrite, and write a bunch of spaces, then gotoxy() to that place again (where the user will give his answer).
http://www.cplusplus.com/forum/beginner/4234/#msg18563

Hope this helps.
Jul 11, 2011 at 5:22pm
thnx Duoas...it helped....now i am trying to understand your function
Jul 11, 2011 at 6:03pm
You only need the #included header and the topmost function, and all it does is call the Windows API function to set the cursor position on the console.
Topic archived. No new replies allowed.