Yes it should work now for windows created on-the-fly.
Once the new Window is created with all its Gadgets, just call SetObjColor() again.
When calling SetObjColor(), the enumeration (PB_Object_Enumerate) is always done now and the new Window and new Gadgets are written in the map. Then put in hierarchy with the backgound colors.
When a window is closed, the window and its child gadgets are removed from the map and the brushes are also released.
Just for info, in case, I won't be home the next 3 days.