I don't really make a habit of sitting on my guy friends' laps because I don't have any kind of flirtatious relationships with them. I wouldn't sit on a guy friend's lap unless there was mutual flirtation, where you both know you kind of dig each other, or just to be funny. In which case the guy would be more like a friendly acqaintence than a close friend. I have several closer guy friends I would never dream of doing that to because that's simply not the nature of our interactions. I wouldn't be able to be close friends with them if there was romantic interest on my part. Sexual interest, I could deal with, but wouldn't act on because I've seen what it can do to friendships, and my friendships are important to me. Plus I feel like lap-sitting is kind of flirting overkill when you don't even know if the guy is into you. I know plenty of girls who would flirt in that manner, but I'm not one of them.
So -hypothetically- if I was sitting on a guy friend's lap and he got a boner, I wouldn't be offended, because I wouldn't be sitting on his lap unless I kinda liked him and vice versa. And logically I know that a guy can't -always- control his body's reaction to stimulation, even if it's as simple as mentally knowing a girl's ass is in his lap, and physically feeling the pressure of it, when she might not actually be doing anything to provoke said reaction. It's just nature. I wouldn't advertise the fact that I knew to anyone else who might be around. I'd probably just quirk an eyebrow at him and stay where I was until there was an opportunity to let him up without risk of embarrassment on his part. So I don't know that I'd be flattered exactly, but I wouldn't be offended. Probably somewhere between understanding and flattered, and I would make sure he knew that I understood and wasn't p*ssed off, haha. =P I'd hate if he felt humiliated because he -thought- I'd be mad.