Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rich Edit Boxes

Status
Not open for further replies.

thiefmaster

Programmer
Jan 27, 2001
22
0
0
US
I'm having trouble using a rich edit text box. Here's the code I'm using.

LoadLibrary("Riched20.dll");

hwndObject = CreateWindowEx( WS_EX_CLIENTEDGE,
TEXT("RICHEDIT_CLASS"),
TEXT("me"),
WS_CHILD | WS_VISIBLE | ES_READONLY,
300,
50,
100,
25,
hwnd,
(HMENU) ID_TXT_2,
((LPCREATESTRUCT) lParam) -> hInstance,
NULL);



When I start the program though, it doesn't show up. This is the same createwindowex call that i made with an edit box, but I can't seem to get it to show the rich edit box.

Any ideas?

Also related to Rich Edit boxes: once I do get it to display it, how can i superscript only a section of the string. eg. if i have something like 3.6 X 10^9, how can i make it say 3.6 X 10 with the 9 superscripted? (including how to remove the ^ easily...)

Any thoughts on this would help...

thiefmaster
 
I have a similiar problem. I created wrappers for every common control, including the rich-edit boxes. All of the controls work, except the rich edit boxes. There are two different ones, the older version and newer. The rich edit control box would appear where it was positioned into, but the actual ability of the control to accept or enter text would not work. The simple edit box worked fine, as all the other simple and complex controls. The code is very similiar to yours. I simply decided to use the simple edit box for the GUI I'm working on.

If you have resolved this, let me know.

Thank you,
Thomas Winter
Gazelle Labs
 
my only problem was that I was stupid and didn't include <richedit.h>... slight oversight on my part... I had to read through a japanese website and look at only the code to figure it out... :)

maybe this will help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top