No good MDI programming style, I would say.
Normally each MDI child window needs to handle WM_PAINT messages which itself needs to be implemented in the message handler procedure associated with the MDI child window class. Depending on the MDI child document type those procedures can be very different, it’s all your responsibility, for your case it should be the same handler.
A redraw can then be enforced by sending a WM_PAINT message to each MDI child, which needs to react accordingly by repainting itself in the WM_PAINT handler.
This can be achieved by sending a WM_PAINT message to each MDI child.
Something like this will force the repaint on the complete client window area
for (k = 0; k < 4; k++) InvalidateRect(glWindow[k].hwnd, NULL, FALSE);
The MDI child message handler needs to do something like this (Just written from memory, not fail safe, not compiled, you’ll get the idea. )
LRESULT CALLBACK MDIChildWndProc(HWND hwnd, UINT uMessage, WPARAM wParam, LPARAM lParam)
{
switch (uMessage)
{
case WM_CREATE:
// get hdc, set pixelformat, create rendercontext, make current, don’t release hdc!
return 0; // Continue window creation. (Otherwise return -1 to destroy.)
case WM_DESTROY:
// cleanup opengl objects, release rendercontext, release hdc.
wglMakeCurrent(hdc, NULL);
ReleaseDC(hWnd, hdc);
wglDeleteContext(hglrc);
PostQuitMessage(0);
break; // DefMDIChildProc() handles the rest.