I DOWNLOADED graphics.h and libbgi FOR ENABLING GRAPHICS IN DEVCPP and ADDED THE LINKERS. I CHECKED THAT GRAPHICS WINDOW SHOWS UP AND RUNS PROPERLY WHEN I USE A SEPARATE PROGRAM FOR GRAPHICS PORTION. BUT WHEN I ADD THE GRAPHICS CODE IN MY ACTUAL CODE , IT THROWS THIS ERROR:
" DRAWING OPERATION WAS ATTEMPTED WHEN THERE WAS NO CURRENT WINDOW"
Well, shouting posts aside, Dev-Cpp from Bloodshed is outdated and dead. There is a guy who picked it up and a new version was just released this past Monday, April 16th. http://orwellengine.blogspot.com/
I'd recommend Code::Blocks though as I believe they both use the MinG compiler I believe.