tags:

views:

26

answers:

2
HWND hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_READONLY | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL, 0, 0, width, height, hWnd, (HMENU)IDC_MAINEDIT, GetModuleHandle(NULL), NULL);

Well, that's how I create an (readonly) edit (textbox) control. How can I create a RichEdit control? I mean, what's the richedit's class name?

I want to use richedit because it has CatText or something like that so I can append text to it, instead of copying it's text - reallocating it and adds appending and finally set the edit's text (I could do in that way, but it's awkward way).

+1  A: 

RichEdit is implemented in several different dll's depending on the OS and version of the control, MSDN has a list of dll's and versions...

Anders
A: 

Creating a Rich Edit Control (on MSDN)

adf88
thanks adf88, I succeeded LoadLibrary("Riched32.dll"); HWND hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "RichEdit", "", WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_READONLY | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL, 0, 0, width, height, hWnd, (HMENU)IDC_MAINEDIT, GetModuleHandle(NULL), NULL);( how do I put a code tag? )
Ohad