Path: utzoo!attcan!uunet!jarthur!usc!julius.cs.uiuc.edu!rpi!uupsi!rodan.acs.syr.edu!jfbruno From: jfbruno@rodan.acs.syr.edu (John Bruno) Newsgroups: comp.windows.ms Subject: Re: Another question (was Re: A basic edit control question) Message-ID: <1990Sep14.143046.4029@rodan.acs.syr.edu> Date: 14 Sep 90 14:30:46 GMT References: <7275@umd5.umd.edu> <1990Sep12.185146.21307@rodan.acs.syr.edu> <57431@microsoft.UUCP> Organization: Integrated Healthcare Technologies, Inc. Lines: 32 In article <57431@microsoft.UUCP> kensy@microsoft.UUCP (Ken SYKES) writes: >In article <1990Sep12.185146.21307@rodan.acs.syr.edu> jfbruno@rodan.acs.syr.edu (John Bruno) writes: >>Responding to my question about intercepting messages to an edit control... >>Well, now I have another question. I'd like to make some text lines in the edit >>control a different color. I guess I'd have to intercept several messages >>to get this to work, like WM_PASTE, WM_PAINT, WM_CHAR, probably some others >>too, but since Win3.0 does the actual drawing of the characters on the screen, >>how can I change their color? Could I do something like was suggested above, >>only in some cases not call the windows edit control proc? Is this a kosher >>thing to do? >> > >Actually it would probably be more kosher to make the listbox an owner-draw >listbox. This will allow you to fiddle it with the output characteristics >to your hearts content. The docs explain how owner-draw controls work. But I'm not doing a listbox, it's an edit control. Page 1-50 in Volume I of the reference manual defines constants for owner-draw list boxes, combo boxes, and buttons only. I was hoping that I could avoid drawing the entire control myself when all I really need is to be able to a have few of the text lines in the edit control be a different color, without the user being able to edit these items. It's easy enough to stop the user from editing certain items with subclassing, but I was hoping for a way to tell Windows that certain lines are to be drawn in a different color. Is there a way to do this without making an owner-draw edit control (yuk)? Is it even possible to have an owver draw edit-control? > >Ken Sykes >Disclaimer: The above opinions are solely my own. ---jb