Good point Crazyandy! (Omit requisite joke about "CrazyAndy's Used trumpet and cornet store" )
Your point about the tongue's role in whistling is exactly correct, for good reason: The tongue's position in the mouth sets the resonant frequency of the oral cavity, which determines the whistled note, AND determines the frequency that the lips vibrate, thus choosing the resonant frequency (which note) is selected for a given valve combination.
For low notes, you have to open the oral cavity sufficiently to select the lowest harmonics of the horn. For the highest notes, you have to shink that oral cavity down so that its resonance selects the higher harmonics of the horn. Physically, that's what happens when we play. It SHOULD be as automatic as whistling, of course!
Hope that helps!