An updated version was published a few days ago, see this new code sample called ScreenSnapshot . There is now highlighted the selection CGDisplayCreateImage . There's even an accompanying technical Q&A .
So, a more general answer: Repeat Apple documents regularly. (Sorry for the extraneous accents over é or fonctions ... somehow Lion spell checker wants to be in French mode .. grr ...)
source share