PDA

View Full Version : urgent: refreshing screen



coda
10-18-2003, 11:41 PM
i have a dialog which appears in front of my SDI view window and whenever user closed dialog or move it away, a white patch (dialog outline)will appear in the view, overlapping my image, how to refresh the image everytime my dialog is moved or closed? need urgent help!

10-19-2003, 07:10 AM
Not sure what your problem is exactly, but try this:
I suppose you have a display function, try adding this say after glutSwapBuffers(): glutPostRedisplay();

This commands asks glut to call display again. Else the display function is only called once

10-19-2003, 04:03 PM
only rude idiots sets a urgent the subject line

coda
10-19-2003, 10:23 PM
thanx but i am not using glut, i am using MFC with opengl. I actually have an SDI view with a few dialogs. When user input some info into these dialogs, my view will show the graphics. It happens that my dialog will appear in front of the view and when user enter some info and close the dialog or shift it away, the graphic that appear behind the dialog in the SDI view seem to be "white" out, thus unable to show the graphics... this is my problem

nexusone
10-20-2003, 04:57 AM
I don't use MFC, but your problem is you need to refresh(redraw) your scene after the dialog is called.
I am sure there is a function that will be called with the sub-window(under lying window) has become damaged.

Look at nehe.gamedev.net and see what he does to refresh in MFC.


Originally posted by coda:
thanx but i am not using glut, i am using MFC with opengl. I actually have an SDI view with a few dialogs. When user input some info into these dialogs, my view will show the graphics. It happens that my dialog will appear in front of the view and when user enter some info and close the dialog or shift it away, the graphic that appear behind the dialog in the SDI view seem to be "white" out, thus unable to show the graphics... this is my problem