Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!rodan.acs.syr.edu!jfbruno From: jfbruno@rodan.acs.syr.edu (John Bruno) Newsgroups: comp.windows.ms Subject: Another question (was Re: A basic edit control question) Summary: It worked, but now I have another question Message-ID: <1990Sep12.185146.21307@rodan.acs.syr.edu> Date: 12 Sep 90 18:51:46 GMT References: <1990Sep11.182127.29856@rodan.acs.syr.edu> <7275@umd5.umd.edu> Organization: Integrated Healthcare Technologies, Inc. Lines: 34 Responding to my question about intercepting messages to an edit control... In article <7275@umd5.umd.edu> brianf@umd5.umd.edu (Brian Farmer) writes: > >Someone at Microsoft thought of this first and called it subclassing. It is >covered in the manuels but I'm not sure where. The 2.1 sdk told you how to >do it but not why to do it. It's also mentioned in passing in "Reference-Volume 1" of SDK 3.0. > [code deleted] Thanks! That's basically what I wanted to do. >Just about any window message if fare game for you to play with. All messages >for the window will pass through MySubclassWndProc before they go onto the >actual window function. You can trap messages, changes messages, add messages. 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? > >Hope this helps, > >Brian Farmer >brianf@umd5.umd.edu Once again, thanks for the help ---jb