When setting the theme of the DockingManager to a theme other than GenericTheme, the error ‘Hwnd of zero is not valid’ gets thrown when trying to dock a window.
I was not able to reproduce the issue using AvalonDock themes with a DockingManager in v3.2. Which themes and which avalonDock version are you using? Under what version of Windows are you working? Could you send me a sample project which reproduces the issue so that I could have a closer look. You may send it to support@xceed.com