Page 1 of 1

QB: PSET (x,y,color) C++ (DOS): ???

Posted: Sat Jul 05, 2003 11:45 pm
by Scarberry
in QBasic there is a command called "PSET". (it puts a pixel at a certain point x,y w/ a certain color) what is the equivlent in C++ Dos applacatins? and how do i use it?
thank you

Re:QB: PSET (x,y,color) C++ (DOS): ???

Posted: Sun Jul 06, 2003 4:33 am
by Tim
Depends on the compiler you're using. There's often a function called setpixel or putpixel.

Re:QB: PSET (x,y,color) C++ (DOS): ???

Posted: Sun Jul 06, 2003 12:43 pm
by Scarberry
i use dev-c++ mostly but i also have VC++ and DJGPP but i prefer Dev-CPP.

Re:QB: PSET (x,y,color) C++ (DOS): ???

Posted: Sun Jul 06, 2003 4:25 pm
by Tim
I don't know how DJGPP does graphics (SVGALib?).

If you're using DevC++ or VC++ then you're not actually writing DOS applications; you're writing 32-bit console mode Windows applications. If you want graphics on Windows you'll have to write a GUI application.

Re:QB: PSET (x,y,color) C++ (DOS): ???

Posted: Mon Jul 07, 2003 7:47 pm
by Scarberry
yeah i knew i wasnt writing dos apps it was just easier to say dos then a "win32 app in a dos window" :P . so ill have to write a windows gui app. that sucks. will i have to use direct x or open gl or is there a pset like command in the windows gui? if so how? any tuts u could point me to?

Re:QB: PSET (x,y,color) C++ (DOS): ???

Posted: Tue Jul 08, 2003 1:47 am
by Tim
No, you can use GDI. The function there is SetPixel.

Did you look at the sample app I mentioned in this thread?

Re:QB: PSET (x,y,color) C++ (DOS): ???

Posted: Thu Jul 10, 2003 5:32 pm
by scarberry
yeah i did download it bu havnt looked at it yet. what is GDI?

thanks

Re:QB: PSET (x,y,color) C++ (DOS): ???

Posted: Fri Jul 11, 2003 9:48 am
by Tim
It's the set of Windows functions that let you draw stuff to the screen.

Re:QB: PSET (x,y,color) C++ (DOS): ???

Posted: Fri Jul 11, 2003 10:05 pm
by scarberry
o ok



thanks for all the help! :)

Re:QB: PSET (x,y,color) C++ (DOS): ???

Posted: Fri Aug 01, 2003 3:36 am
by Pype.Clicker
Tim Robinson wrote: I don't know how DJGPP does graphics (SVGALib?).
there's a library that provide pretty powerful graphic support to DJGPP: allegro.