WindowlessRE Sample Illustrates How to Implement a Windowless Rich Edit Control (270161)



The information in this article applies to:

  • Microsoft Platform Software Development Kit (SDK) 1.0, when used with:
    • the operating system: Microsoft Windows 98
    • the operating system: Microsoft Windows 2000

This article was previously published under Q270161

SUMMARY

The WindowlessRE sample demonstrates how to create and implement a windowless rich edit control. The sample shows how to:
  • Implement the ITextHost interface.
  • Use the CreateTextServices function to retrieve a pointer to an ITextServices interface provided by the Richedit20.dll file.
  • Handle messages that route and paint for the control.
Windowless rich edit controls are supported by the Richedit20.dll file. To create a windowless rich edit control, you must call the CreateTextServices function, passing a pointer to your ITextHost implementation. The ITextHost interface provides such functionality as user interface (UI) activation, host notification, painting services, and an ITextEditControl interface. The CreateTextServices function returns an IUnknown pointer that can be queried for the ITextServices interface.

Similar to all windowless controls, the windowless rich edit control must be contained by a window that is capable of routing messages to and from the windowless rich edit control.

Windowless controls are useful in situations where the overhead of a standard windowed control may not be desirable. Some benefits of windowless objects are:
  • They can be transparent.
  • They reduce overall size of the object in memory.
  • They allow an object to be nonrectangular.

MORE INFORMATION

The following file is available for download from the Microsoft Download Center:
Release Date: Sep-22-2000

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

Modification Type:MinorLast Reviewed:7/11/2005
Keywords:kbfile kbRichEdit KB270161 kbAudDeveloper