>>Btw the handle GetDesktopWindow() returns is 0x10014, so it's different from the desktop handle I'm looking for<<
The handle returned by GetDesktopWindow is the handle of 'the' actual desktop - any other handle you have obtained will be a child window of 'the' desktop.
Any application you create with a main window has the desktop as its parent ie you normally specify NULL as the parent handle in the call to CreateWindow/CreateWindowEx (unless you deliberately specify a different parent).
For a control you could, for example
which makes that (button) control an explicit child of the desktop; the same should apply to user-defined window classes with the WS_CHILD style.
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int)
HWND h=CreateWindowEx(0,_T("button"),_T("child of desktop"),WS_VISIBLE|WS_CHILD,
If all you are concerned about is the z-order, then use SetWindowPos, as Magos has already suggested.