I want to implement basic spell checking in a Notepad clone project I’m doing. I want to underline misspelled words with a squiggly like like Word does. I think I need to use GDI and draw on the text field, but I’m not sure how to draw on controls.
Thanks
I want to implement basic spell checking in a Notepad clone project I’m doing.
Share
If you’re basing your editor on an edit control (as Notepad does), then I think it’s going to be difficult. By subclassing the edit control window, you could probably augment its
WM_PAINThandling. But the problem is the control doesn’t expose a way for you to find out exactly where a word appears within the control. Thus you won’t know where to draw the squiggle.You might be able to use a Rich Edit control (as WordPad does) and tweak the styling of the misspelled words. I’ve never used Rich Edit, so I can’t help with the details.