Ah yes, alarm wiring. A subject I am VERY familiar with as I recently went through all of this installing my security system in my prewired new home.
First thing you need to do is read and understand THIS
(excellently written) How-to!
For the second picture in your post (where the wire is "drilled through" the bottom of the window frame) you should probably use the sensor/magnet pair circled in green in the attached picture below.
In your third picture you would need to use the sensor/magnet pair circled in red. This is an "external" sensor and is explained in that How-to. I don't agree with this as I don't see why they didn't drill through the bottom of the window frame as in your previous picture.
One thing to remember about where these sensors go in the window frame is you have to consider where/how to mount the magnet in the window itself. For instance I ran into a situation where a window track ran along the side of the window (attached via a cable) that made it impossible to mount any type of magnet on the window part (again, explained in the How-to). I would have preferred they drilled through the bottom and I made some kind of arrangement with a mount to have the magnet installed on the bottom part of the window itself since no moving parts were in that bottom section.
One thing to mention though, in that third picture, does that window slide up and down or is it stationary. The reason I mention this is if its stationary (i.e. doesn't open) perhaps some type of "glass break" sensor is supposed to go there. Also, watch when they install the drywall that they don't drywall right over that wire that goes through the 2X4. Take LOTS of pictures because you may have to locate that wiring behind the drywall.
You should also consider the placement of motion sensors, keypads, fire/smoke sensors, and glass break sensors as well and just have them "loop" the wire near a 2X4 so you can get to it later (for instance I had mine right above a set of light switches near my front and laundry room doors for my keypads). Remember that these require four wires (two for power and two for contact closure output).
Oh one other thing, make sure they drill through the door frames and run the wire through that frame itself. This may sound simple but in my case the guys that ran the wiring did so before any door frames were installed and it was left to the guys installing the door frames (enough said there) to drill through the frame and finish running the wire to where it would be accessible.