Selecting an Object

Hello friend,
I have developed an appliction which display two 3D-objects in a same window,now I wants to select one object by a mouse,so that I can change the properties of that object and other remains same.
please provide some code in support of your answer.

With Thanks

But in this code selection made on the TGA image but in my window objects are made or creared by the use of OpenGL itself.

The selection done in this example will work for anything that you draw in OpenGL (with the exception of bitmaps, which will only hit near their initial raster point). In this tutorial, what is being hit is not the TGA - it’s the quad that the TGA is mapped onto. After the call to gluPickMatrix(…), draw your scene, giving each object a name before you draw it. Proceed precisely as in the tutorial.