Finally I have cracked this incredibly annoying problem of black undocked panels when resized on second monitors tonight. Hopefully my solution works for someone else and can save them tearing their hair out. I read several threads on various forums where people had the same problem and had either not fixed it or had found another solution, so I guess the same symptoms can occur due to more than one cause, however this is definitely worth a try as after trying basically everything else possible I stumbled upon the following solution through a process of elimination.
In fsx.cfg, set maximized=1 so that fsx starts in full screen. Then, after it loads a flight you can alt-enter to return to windowed and undock, move and resize panels as needed. After I've loaded a flight this way, I can even "end flight" on the menu, start a new flight which will start windowed (since exiting a flight windowed writes maximized=0 to the config file and further flights then start windowed) and it _still_ works, it seems it just has to be started maximized the first time. Whether this is FSX or the Nvidia drivers at fault I do not know, nor do I care now I finally have this fixed.
If anyone else does this to fix it, bear in mind that unless you maximize fsx then exit or end a flight from that view, it will save maximized=0 to the fsx.cfg and the problem will come right back next time you start FSX. You either need to exit from fullscreen mode each time or have a configuration like mine where there are "master" fsx.cfg files which aren't written to and are used to generate the "actual" fsx.cfg each start (I used Orbx FSXGo which does this) so that you can set the option in the master cfg file so that it is re-set in the generated fsx.cfg every time FSX is started.
I haven't tried whether or not having maximized=0 in the config but then maximizing and restoring back to a window before undocking anything works, but it might.