Best way to access GUI elements?

What is the best way to access GUI elements from code? I used to remember pointers, but this makes problems when user opens more than one window (I saw this in Steinberg Test host)

You should use controllers per window which have bi-directional connections to your model.