PDA

View Full Version : Rotating scene in MFC?



billy
01-28-2002, 01:12 AM
Hello,

I am developing an OpenGL program with MFC. I want to press a specfic key on the keyboard
to pan, zoom and rotate and use the mouse coordinates to calculate the translation, zoom and rotation values.

The problem is when I move the mouse out of the window, the program stops reading the mouse movement, so rotation, translation and zoom stop. If the window is very small I am limited to small portion of the window and not to the whole screen.

I tried to use SetCapture() to capture the mouse, but this does not work because I need to continously press the mouse right or left button and I don't want this to happen.

Does anybody know how to do this. I have seen this in other programs.

Thanks,

Billy.

[This message has been edited by billy (edited 01-28-2002).]

Quaternion
01-28-2002, 10:46 AM
If you are writing an editor, you can use a special key, like CTRL, to activate the camera movement mode (Holding down the CTRL and moving the mouse while the right button is down, for example).

If you want a 3D-Shooter like camera movement, you can try to send the cursor to the other side of the screen when you reach the end of the screen.

billy
01-31-2002, 06:50 AM
Thanks. But I have resolved this for now. I changed from a single document to a multiple document and captured the mouse.

This was really an MFC question and not OpenGL but this is the best place to ask.