Re: how use WriteConsoleOutputAttribute() function?
Originally Posted by 2kaud
A couple of thoughts for you to think about - now that you're refreshed.
1) As Victor mentioned in a previous post, you are not checking for an error using GetStdHandle. You are assuming that a console is present and that you can get its handle. What happens if no console is present? Why not obtain the handle once in the class constructor and if not valid allocate a console? Something like this
2) What if 2 or more instances of your console class are created? IMO at present with your class design they would independently perform their functions on the same console window. So you might have one class instance writing data and another instance clearing the console or trying to write different data to the same locations etc etc? Have you thought about having a differen console window for each instance - or do you want each class instance to share the same console?
lol i'm eating a big 'sandwiches' of very information in same time lol
thanks for all to both.. thanks