Quote Originally Posted by ventolin
For example when i click the New in the menu .. a dialog box pops up and focus is set to that. If i drag it for example it blurs the screen/leaves the menu still open until i close the dialog box.
This is because the window client area is not being updated in response to WM_PAINT as ganonl has suggested. Put a call to whatever your opengl 'drawing/rendering' function is in a WM_PAINT handler.

This will probably lead to a new problem - menu flicker (if you get to see the menu at all). The workaround for this is to handle WM_INITMENU and WM_EXITMENULOOP where you call ValidateRect and InvalidateRect respectively. Validating the client causes your opengl rendering to 'pause' allowing the menu to be drawn and invalidating resumes client area rendering. Something like:
Code:
case WM_PAINT:
  OpenGL_Drawing_Fn(); /*or whatever you've called it*/
  return 0;
case WM_INITMENU:
  ValidateRect(hwnd,0);
  return 0;
case WM_EXITMENULOOP:
  InvalidateRect(hwnd,0,0);
  return 0;
This assumes a message loop using PeekMessage and not GetMessage.