A young infant cries while having his or her pajamas buttoned.
A young infant is wearing pajamas.
Pajamas are buttoned when someone is wearing them.
Having pajamas buttoned implies the infant is wearing them.
If the infant is having his or her pajamas buttoned, the infant is naturally wearing the pajamas.