flaked wheat/barley/oats are supposedly good for this. unmalted grains. they contain more protein and therefore help hold the head. on the other hand, oats have oils and fat in them, so they can damage the head, making it big and frothy but dropping quickly.
i used to add a pound or so of wheat to every recipe to help with head retention. i stopped and haven't noticed much difference.
all-grain brewing in general helps, i think. you get more proteins than with extract.
mashing can cause these effects, too. doing a proper protein rest supposedly helps.
all things to think about. do some web searches on "head retention adjuncts mashing" etc. and you'll find lots of info (not all the same, however.) alot of info on BYO as well.
try a few things out and see what works. good luck.