paraGOD wrote:
Thank u , but this method can't draw the text in the edit contol.
SetWindowText() *can* draw the text in the edit-ctrl. In fact, its the only way to do it this side from owner-drawing the whole control. Your way paints the text at the exact place where the Edit-ctrl is located, triggering the edit-ctrls redraw. Your text gets overwritten. If what you want to acomplish is putting your Text into the Edit-ctrl, then SetWindowText() is the way to tell the Edit-ctrl what text it has to draw. If you want something different, you should subclass CEdit and do it yourself, possibly delegating routine tasks to your baseclass CEdit.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation." -- Caius Petronius, Roman Consul, 66 A.D.