MFC & glut

Hi everybody,

I’ve developped a dialog application under VC 6.0, in which I create a window using glutCreateWindow(…). It works but I have two problems
- First, if X button is clicked, all my windows are closed (all the opened window of my project…)
- I’d like to set the focus to the glutWindow even if I click on one of the modal dialog of my application. (One is a kind of handler where you can move the camera,… of the animation).
To solve these problems I’ve created a thread(AfxBeginThread(AfxBeginThread(displayFunction,(LPVOID)0) ). In displayFunction is the code where I create the animation, but this did not sove anything…
Could anyone help me???
Thank you very very much for advance…
Vincent