Myridon

Question: In the scene where Rolfe is throwing stones at the window, Captain von Trapp catches him and after trying to explain, Rolfe says Heil Hitler. I was just wondering why he says that seeing as all three there are Austrians (esp. von Trapp) and Germany hasn't taken over Austria yet.

Answer: Some Austrians (such as Rolfe) had already been converted to the Nazi cause as a political/social/pseudo-religious movement rather than as an expression of German nationalism, just as you can live in a democracy and be a communist.

Myridon

Answer: Rolfe sees Max, who he knows is at least loosely involved with Nazi affairs, and then exclaims "heil Hitler." Being merely a child foot soldier for the Nazis, he wouldn't know the extent of Max's involvement with the Nazis, but knows enough to say "heil Hitler", just in case.