I want to draw a magnifying glass using graphics.h which is used mostly as "Search" icon. But, I am having problems in making the rectangle attached to the two circles (one inscribed on another) . I'eve also included the screenshot (made in powerpoint) on how the output will look like, enen I've made most of the part, except the search icon (magnifying glass). Will you please help me!
The reason you aren't getting a satisfactory answer is twofold:
The library you are is ancient. No one uses it anymore except for high-schools and universities in India (I think -- don't get mad at me if you are in Pakistan or something), and the poor saps like you get stuck with it. It isn't your fault, but you unfortunately have to deal with it...
The format of the image data was never described by the folks at Borland. I couldn't reverse-engineer the EGA image format as a kid (though I admit I gave up really easily).
If you are using an EGA video mode, the graphics data is divided into four "planes" of pixel-mapped data, which is stored consecutively. Some buffering may be involved (I don't remember), and the header for image dimensions is more than a simple width+height thing (IIRC). I imagine that all went over your head...
Your best bet might be to write yourself a little pixel editor, draw your image using your editor, then save it with the 'save image to file' function (sorry, I'm not going to dig out my old manual right now -- assuming I still have it -- but I'll probably look for it sometime later).
The only other real option you have is to create a routine that draws the image with some simple primatives -- circles and lines -- and just call the routine to place the image where you want it.