If you say 'in front of the window', then 'window' is accusative (in the Latin, of course). That seems to be the clearest way to explain it. A prepositional phrase is like a little 'packet' grammatically separate from the rest of the sentence: thus, whenever you say 'in front of the window', it is ante fenestram.

Prepositions are said to 'govern' a case, meaning that they must be followed by a noun in that case. So, for example, a word belonging to the preposition 'ante' is always in the accusative; a word belonging to 'sine' always in the ablative. There are some prepositions, that govern two cases

Those cases have nothing to do with the normal function of these cases in the sentence. For instance, in the sentence: the cat runs before the window, you could replace 'before the window' with 'there'; e.g. an adverb of place.

prepositions either take the accusative or the ablative, some both. a general thing to keep in mind is that the accusative signifies motion with a preposition and the ablative signifies location. so 'in' with accusative means "into" whereas with the ablative it means simply "in" as "inside". of course, this is just a general rule.