The function doesn't work for non topmost windows. You can see the problem with a test like this:
```c HWND new_parent = CreateWindowA("static", "parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 0, 0, 600, 300, NULL, 0, 0, NULL); SetParent(parent, new_parent); hwnd = GetWindow(parent, GW_ENABLEDPOPUP); ok(!hwnd, "Unexpected value %p.\n", hwnd); ```