I'm currently attempting to get Win32 Console Application to draw a line in the window...and for the life of me I cannot get it to work. I've poured over forums and websites galore but to no afail.
Can anyone lend a hand or does someone have an example of the code which will cause the line to be drawn in the appilcation window? All i want is help understanding How i get the code to create it. I'm not worried about colours or funky shapes, I'd even settle for a box outline which I can place stuff into.
This is all building up to a tetris clone I'm going to be working on but i'm trying to get the basics out of the way and Win32 seems like an important thing to have knowledge in.
Are you talking about a console-based Tetris clone?
The console does not support any graphics, so there is no way to draw an actual line like the ones which a GUI app can display. (Also see PS)
You can draw boxes using chars, but then you've got to make sure the right code page is being used (if using Ansi chars) or deal with Unicode. (This code assumes code page 437.)
PS It is possible to make it look like a console can draw an image, etc. But than involves the use of a regular windows in front of the console. Getting this to work smoothly is prob. more trouble than coding a regular GUI app.
the link above is essentially what i want to achieve or atleast similar. Its the blocks that confuse me :S but I'm abit stubborn when it comes to asking.
I apprecaite your help and anyone else who wants to jump in with advice :)
I think I'm far too tainted, from working with assorted Windows technologies, to have a valid opinion on the best 2d graphics library for a novice programmer. But the name I see recommended the most often on this site is Allegro.