I have tried thoses example for a dialog, but if i make a button in the dialog window it flickers. That is why i am trying to make the OpenGL inside the CStatic object . . .