Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!rutgers!mit-eddie!uw-beaver!milton!sumax!quick!cctb!curt From: curt@cctb.wa.com (Curt Johnson) Newsgroups: comp.windows.ms.programmer Subject: Re: Subclassing Message-ID: Date: 23 Mar 91 12:04:08 GMT References: <1580@msa3b.UUCP> Organization: Chemical Computer Thinking Battery, Redmond, WA Lines: 30 In article <1580@msa3b.UUCP> kevin@msa3b.UUCP (Kevin P. Kleinfelter) writes: | 2. The program could add text to the window (with an edit control, | it appears that the program can only SET the text, and I'd like | to add a line, add another line, etc.) | | I don't see how to | do #2; how can I add text? The only way I can think of is to | get all the text from the edit control into a buffer, concatenate | my text onto the end, and then set the text of the edit control. | Is there a better way? I have an idea, it's probably not better, but may be easier. Send WM_CHAR messages to the edit control to add each character. It should not take too long if you aren't adding too many characters. Another thing you could consider if the data is really line oriented is using a list box. #if SILLY_EXAMPLE_THAT_ALMOST_RELATES_TO_CURRENT_QUERY I once wrote code to make a multiline edit control on the Macintosh a list box (before list boxes were available). #endif Curt Johnson == curt@cctb.wa.com