You lose your Dexterity bonus to AC (if you have one) against opponents you aren’t grappling. (You can still use it against opponents you are grappling.)
Footnote regarding pinned and helpless defenders' AC in Favorable and Unfavorable Conditions, marked against the -4/+0 modifiers for melee/ranged for each:
Treat the defender’s Dexterity as 0 (–5 modifier).
While you’re pinned, you take a –4 penalty to your AC against opponents other than the one pinning you.
Fiona's BAB grants her multiple attacks. In a grapple, she uses one of these to successfully pin Edgar, and the next to attempt to use his rapier against him. She succeeds on the opposed grapple check and makes an attack roll with the weapon, taking a -4 penalty.
Edgar retains his Dex bonus against Fiona, and does not suffer the -4 AC penalty he would against other opponents. Therefore,
- As Fiona is the one pinning him, his AC is unchanged (10 + Dex + mods), or
- As he is pinned, his effective Dex is 0, and a -5 Dex modifier is applied to his AC (10 - 5 + mods).
So which is it?
RAW seems ambiguous to me here, but I am inclined to think number 1 applies. The footnote above is attached to a modifier that is applied to non-pinning opponents. The intention of pinning is probably a "I'll hold him, you punch" tactic rather than locking them down one-on-one.
On the other hand, if a pin is representative of your holding a character so still that their Dex is effectively 0, then he's not moving with respect to the pinner either.