Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mcdchg!chinet!patrickd From: patrickd@chinet.chi.il.us (Patrick Deupree) Newsgroups: comp.windows.ms Subject: Re: "edit" - class: How to underline? Message-ID: <1990Oct12.043955.25193@chinet.chi.il.us> Date: 12 Oct 90 04:39:55 GMT References: <90.283.17:04:51@ira.uka.de> Organization: DKW Systems Corporation, Dallas, TX Lines: 23 In article <90.283.17:04:51@ira.uka.de> tremmel@ira.uka.de (Wolfgang Tremmel) writes: >I am trying to program a simple Text - Editor in MS - Windows. >Now the Question: How can I tell a window with class "edit" to >allow underlining, bold, italics etc.? >Has anybody allready done it and how? Well, this is an interesting one. Since underlining is done by changing a font to a different style (so to speak), you can't really say "underline this text". What you'd have to do, probably, is sub-class the edit control and set up one that will monitor the text in the Window. It would have to intercept all characters coming into the edit control and output them in their proper style. You'd probably have to keep a buffer of text as well so that you know what's underlined and whats not. Then, when the screen redraws you'd have to tell it what text to redraw in underlined form, what to draw as italics, etc. Not a straight forward thing to do. It'd be easy enough to underline all text, though. -- "What's in a name? That which we call a rose by any other name would smell as sweet." William Shakespeare Patrick Deupree -> patrickd@chinet.chi.il.us (708) 328-3800 (Please note there are both a patrick and a patrickd at this site)