Microsoft KB Archive/261171

{|
 * width="100%"|

HOWTO: Create Richedit Control Version 2.0 and 3.0 with the Visual Studio Resource Editor

 * }

Q261171

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK)

-

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(&quot;riched20.dll&quot;) 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 &quot;RichEdit&quot;. 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.

Additional query words:

Keywords : kbRichEdit kbGrpDSUser kbDSupport

Issue type : kbhowto

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch