This idiom comes from Records of Three Kingdoms• Kingdom of Wei • Biography of Lu Yu. When Lu Yu, the minister of the State of Wei was young, his parents and brothers all died one after another, and he became an orphan. In such a difficult situation, he still studied very hard. Finally he became a talented person and served as a high officialof hisstate.Hewassouprightin performing his official duties that he was promoted to the minister of the Board of Civil Office, in charge of the officials' appointments and removals.
Owing to the vacancy of Lu Yu's original post, it had to fill up a new official for it. Although there were many officials to recommend some well-known people for the post, all were refused by Emperor Wen. He only let Lu Yu do it and also pointed out:"It depends on you whether we can find the right person for the important post. But we can't choose someone only with fame in stead of his real ability. You see, the fame is just like drawing cakes on the ground to allay hungry."
This is the story about "画饼充饥".
Then Lu expressed his idea:" You are right, YourMajesty, selections should depend on their real learning and abilities. But the real fame is still very important, such as self-possession and high moral character. So we should select people with both of them."