Image mouse control!

Hi! I am trying to display two images simultaneously and was wondering if it possible to have a separate mouse pointers for each image and if yes then which function do I need to use. I would appreciate any help!!!

Thanks
pran

Hi I have tried to do this but then the cursor is always for the first file.

    glutInitDisplayMode( GLUT_RGB |GLUT_DOUBLE| GLUT_STEREO);
    BitmapBits1 = LoadDIBitmap("earth.bmp", &BitmapInfo1);
    BitmapBits2 = LoadDIBitmap("pic.bmp", &BitmapInfo2);
    glutInitWindowSize((int)BitmapInfo1->bmiHeader.biWidth,
                 	     (int)BitmapInfo1->bmiHeader.biHeight);

    glutInitWindowPosition(250,250);
            glutCreateWindow("Stereo Image Viewer");
    glutReshapeFunc(Resize);
    glutDisplayFunc(Redraw);

    if(BitmapBits1)
    {

            // changes the cursor image of the cuurent window
             glutSetCursor  (GLUT_CURSOR_CYCLE);
             glutMouseFunc(Handler);
    }
    else
    {
              // mouse pointer for the second file
              glutSetCursor  (GLUT_CURSOR_HELP);
              glutMouseFunc(Handler1);

    }

and if I take the if statement out then it displays for the second file only…

does anyone know how to do it.

Thanks
pran

Should not the cursor change code not be in the display routine???

[This message has been edited by nexusone (edited 03-12-2004).]

How many windows are you using and how are you drawing into them? Once you’ve let glut take over, I don’t think you can change the mouse function. But you could have a smart mouse function, so that shouldn’t matter.

PS
Lay of the exclamation points.

well what is a smart mouse function…??? and how can i make one ??

p.s- I am using one window do display both images by using quad buffering. And want to have different mouse pointers so that I know which image I am in.

Thanks
Pran

[This message has been edited by pran1 (edited 03-14-2004).]

Even if I put the mouse function in the display functgion it just displays for the second image.

You can e-mail me your code and I can see what I can do, just remember to include the image files to be loaded.

Originally posted by pran1:
Even if I put the mouse function in the display functgion it just displays for the second image.

PLEASE CHECK YOUR EMAIL i HAVE EMAILED YOU THE CODE WITH THE IMAGE FILES.

THANKS
PRAN

Originally posted by nexusone:
[b]You can e-mail me your code and I can see what I can do, just remember to include the image files to be loaded.

[/b]

if(BitmapBits1) ???

Isn’t this one always going to be true ?

I will check my e-mail when I get home from work, expect it to about 10 to 12 hours from time of this post before I will reply back.

Originally posted by pran1:
[b]PLEASE CHECK YOUR EMAIL i HAVE EMAILED YOU THE CODE WITH THE IMAGE FILES.

THANKS
PRAN

[/b]

ya but I have removed if(BitmapBits1) and it still dosent work seems like one function overwrites the other…

pran