+ case WM_COMMAND:
+ // system messages such as SC_CLOSE are sent as WM_COMMANDs to the
+ // parent MDI frame and we must let the DefFrameProc() have them
+ // for these commands to work (without it, closing the maximized
+ // MDI children doesn't work, for example)
+ {
+ WXWORD id, cmd;
+ WXHWND hwnd;
+ UnpackCommand(wParam, lParam, &id, &hwnd, &cmd);
+
+ if ( cmd == 0 /* menu */ &&
+ id >= SC_SIZE /* first system menu command */ )
+ {
+ MSWDefWindowProc(message, wParam, lParam);
+ processed = true;
+ }
+ }
+ break;
+