戴高帽 ('to put a tall hat on someone') is the standard idiom for 'to flatter.' The image likely originates from imperial-era ceremonial caps that puffed up the wearer's height — putting one on someone metaphorically inflates their ego. During the Cultural Revolution, the literal sense returned: paper dunce caps labeling 'class enemies' were forced onto victims at struggle sessions.