ogl + MessageBox

recently i wrote windowed opengl aplication, everything works except MessageBox function, it simply doesn’t appear(it is created though). I can make it visible by pressing ALT, obviously it isn’t solution :slight_smile: . Anyone have idea how repair it?? thanks in advance

No clear idea, try the windows forum, also you could try sending it a refresh event / invalidate rect event to see if it redraws. I think it should work if you’re not messing with it too much but I’m a bit rusto on that stuff, there can be quirks in how you’re supposed to instantiate them and a standard windows MFC or win32 search may get you a result.

I would take a look at NeHe’s OpenGL tutorials to see how he sets up his windows. Message boxes always work fine with his code:



first of all thanks for replying :], today I discovered that my drawing function responding to WM_PAINT message wasn’t good enough :smiley: . When i added DefWindowProc() after my drawing procedure MessageBoxes started to appear. So i must be missing some crucial WM_PAINT knowledge. Right now my function does that:

  • clears buffers
  • draws textured quad
  • swaps buffers

Am I missing something windows specific?