部屋の中で泣いている
is correct because 泣いている is an action which takes place in 部屋の中.
A good check for whether a short phrase is correct is to just Google it. Google has over 200,000 hits for the correct で version, and none for the incorrect に variation. Although.. I imagine Google will soon index this page! :)