Archived

This topic is now archived and is closed to further replies.

nold

Bitmaps(console application)

Recommended Posts

Can someone point me to a site or give a example of how to draw single pixels or bitmaps on a console app?

Share this post


Link to post
Share on other sites
I guess you cannot draw single pixels on a console. Consoles uses text mode graphics only (unless we are speaking of the rocking linux frambuffer console in which this MAY be possible but I am not sure).

Share this post


Link to post
Share on other sites
Well, there are ways. You could use some lib like maybe allgro or something. They should have functions that drawpixels and such. All you have to do is read the .bmp and draw the thing. Try googling for the .bmp format specifications.

Share this post


Link to post
Share on other sites
well there IS a way to do something like that but i never tried it.
If you have a normal console app u can use
GetDC(NULL);
to get the dc of the desktop and draw what ever u like with the WindowsGDI functions like SetPixel on the desktop.
But u need the DC of your console window.
I think there is a way to get the HANDLE of your console window too, but as i said before.. i never tried it.
If it works then there may still be the problem of overlapping the gfx part with the text.
maybe there is a way to get around that or not.

hope this helps, stryx

Share this post


Link to post
Share on other sites