Fix bug of child windows that can't not open again in the process when they are closed with selecting 'Close' in the window menu of the title bar
@@ -5377,25 +5377,15 @@ | ||
5377 | 5377 | return 0; |
5378 | 5378 | } |
5379 | 5379 | |
5380 | - case WM_NCLBUTTONDOWN: | |
5380 | + case WM_CLOSE: | |
5381 | 5381 | { |
5382 | - | |
5383 | -#ifdef HTCLOSE | |
5384 | - if (wParam == HTCLOSE) wParam = HTSYSMENU; | |
5385 | -#endif /* HTCLOSE */ | |
5386 | - | |
5387 | - if (wParam == HTSYSMENU) | |
5382 | + if (td->visible) | |
5388 | 5383 | { |
5389 | - if (td->visible) | |
5390 | - { | |
5391 | - td->visible = FALSE; | |
5392 | - ShowWindow(td->w, SW_HIDE); | |
5393 | - } | |
5394 | - | |
5395 | - return 0; | |
5384 | + td->visible = FALSE; | |
5385 | + ShowWindow(td->w, SW_HIDE); | |
5396 | 5386 | } |
5397 | 5387 | |
5398 | - break; | |
5388 | + return 0; | |
5399 | 5389 | } |
5400 | 5390 | } |
5401 | 5391 |