girls say that normally because A) they do have a bf, B) they're not attracted to you, C) they're screening you.
as for what to say... well... doesnt matter. your reaction says more than your actual words. and your reaction should be that you dont care whether she has a bf or not. so anything you say will work, as long as it's congruent with that state of mind. you can also use this as an opportunity to disqualify yourself or neg her...
some ideas:
"aww cute, anyway *new thread*"
"really? me too!"
"i wasn't hitting on you, dear

, i dont do blondes/brunettes/tall girls/short girls"
"your self confidence is admirable, but not everyone who talks to you is trying to pick you up

"
-say nothing, just tilt your head, give a slight *haha, you're an idiot* smile and continue talking
you:"want to get some coffee/a drink/ etc?"
her:"i have a bf"
you:"and that means that you're not allowed to have coffee/a drink/whatever? wow, he's got you in check... i need to meet this guy and learn from him!"
another one i've used once (which worked well btw):
her: i have a bf
me: hey look! its a friggin flying panda!
her: what? where?
me: i dont know, im just changing the subject.
her: *laughs*