I was thinking of printing some border design at the screen borders(see below) in c++ using graphics (using alt codes) but don't know how to. Please help.
Alt code used: http://www.alt-codes.net/
Sorry patterns appear distorted in preview(dont know why), but you can guess what I want.
and so on.....
Code block added - OriginalGriff[/edit]
I'm assuming you're working on a Console Application on Windows? If not then this will be completely wrong.
The console is a relatively small fixed sized grid 80x25 or perhaps 120x43 depending on how you've configured it.
If you're going to paint whole console screens then I would set up one or more 80 x N arrays in memory and write a 'blitter' function to write an array to the screen all in one go.
Win32 functions like
FillConsoleOutputCharacter and Fill
ConsoleOutputAttribute will help you there.
The trick to getting useful symbol characters out of which you can construct boxes and borders to appear is in setting the right
Code Page. A Code Page is an old fashioned way of doing internationalisation on the console, essentially it swaps the extended ASCII character set (chars>127) for one containing accented characters or cyrillic or whatever. To get the symbols you want I think it's code page 852 you need which is an IBM character set definition from the early days of the PC. You'll have to check. The
SetConsoleCP function will enable you to change it.
If you're going to be doing a lot of this sort of thing and don't want to write it all yourself from scratch you might consider searching for the
pdcurses library, a Windows port of
ncurses which is essentially a 'windowing' library for the console. It will have boxes, menus, popups, buttons etc.
ncurses is part of the Linux Standard Base.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)