What do you mean by building structure? Traditionally, the installation is in the load-bearing wall, but windows can also be installed in the insulation layer; this is also done. Both variants have advantages and disadvantages.
Even if a window is to be installed in the insulation layer, it is sufficient to align the back of the frame flush with the outer edge of the masonry, since the optimal installation is located in the first third - viewed from the inside.