Code Samples – Win32 Console Class

View and download:
	CConsole.h 
	CConsole.cpp

Summary

This is a Console class used on Win32 applications. I made it for an interview test, but it managed to be useful for other simple applications. Basically, it lets you customize the Console on run-time. It is very simple, it can be extended to have more functionality, like color change.

Remarks

  • Change buffer and window size to fit your needs: Sometimes you need to fit a lot of data on the console in a certain format. This class will let you set your dimensions on run-time. Window size and buffer size are two different things, so it is important to be aware of that.
  • Set the cursor position: There is a method that will let you to easily set the cursor in any position you want (Inside of the dimensions of the Console of course)

 

If you have any recommendations or feedback, please let me know on the comments below!

Leave a Reply

Your email address will not be published. Required fields are marked *