Can you put pictures in a CMD window?

Started by
10 comments, last by wendigo23 18 years, 9 months ago
I was just curious if it's possible to put a picture in a normal cmd window. I've wanted to create an old style text-based rpg for a while now, but it has a card based battle system. Cards are easier to recognize at a glance if they have visual features, so i want to put some images in; however a text-based rpg just isn't the same if it's not in a cmd window. I program in C++, so any answers i may get should be for that. Thank you to anyone who helps out^^ Meow.
Advertisement
In short, no. You would have to display it using ASCII. For example, something that looks like this, but you would have to do all the coloring of the text font and etc to make it look right.

Alternatively, you can make a graphical based program that *looks* and *acts* like a cmd window and take that approach as well. Just an idea though. Good luck!
Mmm, i suspected as much. I was also thinking of making a simple win-32 app, and just color it like a cmd window, then plop in pictures as needed. I don't know much about win-32, im still trying to find a good tutorial online (too broke to buy a book T_T) Not sure how well this method would work though.

Mrow.
Quote:Original post by Drew_Benton
In short, no. You would have to display it using ASCII. For example, something that looks like this, but you would have to do all the coloring of the text font and etc to make it look right.

Alternatively, you can make a graphical based program that *looks* and *acts* like a cmd window and take that approach as well. Just an idea though. Good luck!


That sounds like an interesting idea, I guess you would have to do this through the Win32 API?

That would be an interesting tutorial for someone to write up, I'd be interested in that, especially for my text based Tennis Simulation I'm programming.
Quote:Original post by ChaosCommand
That sounds like an interesting idea, I guess you would have to do this through the Win32 API?

That would be an interesting tutorial for someone to write up, I'd be interested in that, especially for my text based Tennis Simulation I'm programming.


Actually you could do it in whatever you wanted to, SDL, Allegro, OpenGL, or DirectX. I'll see if I can throw something together showing this in SDL. I need something to use my input library on anways [wink].
Quote:Original post by Drew_Benton
Quote:Original post by ChaosCommand
That sounds like an interesting idea, I guess you would have to do this through the Win32 API?

That would be an interesting tutorial for someone to write up, I'd be interested in that, especially for my text based Tennis Simulation I'm programming.


Actually you could do it in whatever you wanted to, SDL, Allegro, OpenGL, or DirectX. I'll see if I can throw something together showing this in SDL. I need something to use my input library on anways [wink].


That would be awesome! If you could shoot me an e-mail if you get it finished, that would be great too.
Couldn't you subclass the window? Then you can draw anything you want.
Quote:Original post by ChaosCommand
That would be awesome! If you could shoot me an e-mail if you get it finished, that would be great too.


Will do! I'll also make a post showing it as well for anyone else that's interested. Right now it's working well, it should't take too long to finish up. I'm running out the door now, so here's a demo to try. Download Let me know how it works for you guys.

I hope it works, but if not, I'll fix the exe when I get back. I did make it in VS7 in release mode, and looking at dependecies, it might need those runtimes. Right now all that is supported is alpha keys, shift, space and backspace. I made it so once you do hit enter, you cannot backspace over it again, but if I wanted to, I can make it so you can easily just keep on going back. [smile]

Quote:Original post by wendigo23
Couldn't you subclass the window? Then you can draw anything you want.


Not sure but sounds like a possibility, wanna test? [grin]
You could always use OpenGL with GLUT. The disadvantage would be that you'd have an OpenGL window AND a command window, but it'd be a much shallower learning curve, and an easy way to introduce yourself to programming with computer graphics.
This tutorial on Win32 API is, in my humble opinion, one of the best out there.

This topic is closed to new replies.

Advertisement