They are not on the same wiring to my knowledge.
The plastic switch for you moonroof is probably broke. So when you think the switch is turned, actually, its not moving the switch inside..so it dont close. You have to remove the housing by popping out the light lens covers. (They pop out in the center and have tabs on the outter sides holding them in.) Once those are removed, remove the 2 philips screws up inside above the light bulbs. The front will drop down and you can slide the whole housing towards the rear of the car. You will see 2 wiring harnesses...one for power for the light bulbs and one for the moonroof switch. Look at the black box switch for the moonroof and you will see on the sides how the plastic piece connects to the switch and how it breaks. You can use a pair of plyers to move the switch to close the moonroof...just be careful. It often happens to me anyway that one way will still work (typically open) and when you rock it the other way it will not work.
As for windows...tap the door switches or press fairly hard. These terminals tend to gunk up and not work. If it moved 1/4 inch, then its got power/etc...put the key in, turn it on, and tap/press/play with your switches. Besure to be pressing the up as to not put it down any further.