Microsoft KB Archive/270161

{|
 * width="100%"|

WindowlessRE Sample Illustrates How to Implement a Windowless Rich Edit Control

 * }

Q270161

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), on platform(s):
 * the operating system: Microsoft Windows 98
 * the operating system: Microsoft Windows 2000

-

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:

"WindowlessRE.exe" Release Date:

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

"Q119591 How to Obtain Microsoft Support Files from Online Services" Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.

Additional query words: WindowlessRE

Keywords : kbfile kbRichEdit kbSDKWin32 kbGrpDSUser kbDSupport

Issue type :

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch