Yes you cant buy a gun for someone else that is illegal,
Completely untrue. You certainly can
buy a gun as a gift for someone else, as Don H and others have pointed out.
OP, do a search for previous threads on gifts and straw purchases - this has been discussed many times before. Even if it wasn't for your wife it would be perfectly legal.