News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

RichEdit - Multiple Rich Edit Classes

Started by RedXVII, May 05, 2006, 10:47:17 PM

Previous topic - Next topic

RedXVII

Ive just made a window with 2 rich edit's on it.

I found out that the 2nd RichEdit control appears to be "inside" the First. For example, when i put text in the second, then go to the first and hit enter; it moves my second RichEdit Control down a line from where it was. Im like wtf.

Heres what i want, in pixels (l33t ASCII art! =) )

|---------------300------------------|
_
|
|
|          RichEdit1
|
|
300
|
|
|
--
_|-----------------300-------------|
|
100       RichEdit 2
|
--

But as i said before, RichEdit 2 is like an object within RichEdit1, and it moves RichEdit2 down whenever i press enter in RichEdit1. Basically; I dont want this, i want them to be seperate. I cant see why they'd join together, unless its a default option that overides my input dimensions in CreateWindowEx or something.

invoke CreateWindowEx,WS_EX_CLIENTEDGE, addr RichEditClass, 0, WS_CHILD or WS_VISIBLE or ES_MULTILINE or WS_VSCROLL or WS_HSCROLL or ES_NOHIDESEL, 0, 0, 300, 300, hWnd, RichEditID1, hInstance, 0
invoke CreateWindowEx,WS_EX_CLIENTEDGE, addr RichEditClass, 0, WS_CHILD or WS_VISIBLE or ES_MULTILINE or WS_VSCROLL or WS_HSCROLL or ES_NOHIDESEL, 0, 350, 300, 100, hWnd, RichEditID2, hInstance, 0


Does anyone know if theres a problem using multiple richedit classes, and does anyone know what i should do?

PBrennick

When you used CreateWindowEX t make the first window (RichEditID1), you received and saved a handle that was assigned to that window.  Make sure you are not using that handle in the CreateWindowEX you are using to create RichEditID2

Paul
The GeneSys Project is available from:
The Repository or My crappy website

RedXVII

Woops!

I had a sleep on it and figured it out. I had a WM_SIZE message which was messing things up.

Cheers anyway :U

PBrennick

The GeneSys Project is available from:
The Repository or My crappy website