This may be a simple question (and demonstrate how well I don't undestand windows, I guess :):

I decided to add a status window to Iczelion's RichEdit tutorial. In the WM_CREATE secton of WndProc I now have the following:

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,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
hWnd,
RichEditID,
hInstance,
0
mov hwndRichEdit,eax
invoke CreateStatusWindow,
WS_CHILD+WS_VISIBLE,
NULL,
hWnd,
IDC_STATUS
mov hWndStatus,eax


as well as the necessary:
invoke InitCommonControls
elsewhere.

When the window is created, the statuswindow appears at the bottom, however with a few problems:
* If you enter text and hit enter to go to the next line, the status bar 'dissapears' as the RichEdit window draws over it.
* If you get enough text to bring up a horizontal or a vertical scroll bar, then both either overwrite the status window, or are overwritten by it, depending on what you're doing.

I'm assuming this is because the RichEdit window in fact takes up the /entire/ window and therefore doesn't know about the status window.

What' I'm wondering, is now I can bound the RichEdit window so that it rests just above the status window?

Thanks.
Posted on 2001-07-22 03:05:45 by doreiwolf
Hi

i dont know this tutorial ,but im shure i understand ur problem.

first look if there is a xzy.RC file inside the tutorial src.
if yes open it and look for the richedit and the statuswindow ,here you can change the size and direction of the controls.

like : 10,20,30,40

10=left/right direction
20=up/down direction
30=left/right size
40=up/down size

if there is no xyz.RES files look in the source, there is at the beginning in the code section the function to create the rich edit.
here you also can change the size.

cu
Posted on 2001-07-22 03:57:17 by CodeMonkey
There's no definition in the .RC file. However, I tried changing the CW_USEDEFAULT for nWidth, and nHeigh in the CreateWindowEx call to being specific numbers, and it didn't make any difference at all, I'm afraid.
Posted on 2001-07-22 04:26:10 by doreiwolf
doreiwolf,

I also had this problem with my first text editor. The problem is in your WM_SIZE, not CreateWindowEx. See, when your window loads, or the user resizes it, it needs to know how update the different controls so they are sized to the correct proportion. This is a b*tch. Period. E-mail me your code (the file with WndProc and WM_SIZE in it, and I will help you learn this horrible task ;)

Karl
Posted on 2001-07-22 13:26:14 by karl
Hi doreiwolf,

Have a look at the sample RichEdit program on my
Web Site it has a Menu, Toolbar, Statusbar,
File I/O, Find/Replace, Font control, and Color
control. Plus it will show you how to size the
various controls.

Ewayne
Posted on 2001-07-22 22:34:03 by Ewayne