How To Create Richedit Control Version 2.0 and 3.0 with the Visual Studio Resource Editor (261171)



The information in this article applies to:

  • Microsoft Platform Software Development Kit (SDK) 1.0

This article was previously published under Q261171

SUMMARY

By default the Visual Studio Resource Editor creates version 1.0 of the Richedit control. By changing the class name in the .rc resource file and linking to the proper library, later versions of the Richedit control can be created in a dialog box resource.

MORE INFORMATION

To create the Richedit control you must call the LoadLibrary function on the appropriate Richedit dynamic-link library (DLL) somewhere prior to attempting to create the control. Doing this allows the control to register its class name. For example, to use a Richedit version 2.0 or version 3.0 control in a dialog box, you must call LoadLibrary("riched20.dll") prior to attempting to load and initialize the dialog box resource.

When the Resource Editor is used to create a Richedit control, by default it creates version 1.0 of the control with the class name "RichEdit". You can edit the resource file in the text editor and change the class of this control to RichEdit20A and RichEdit20W to request the latest ANSI or Unicode version of the control.

Modification Type:MinorLast Reviewed:7/11/2005
Keywords:kbhowto kbRichEdit KB261171