
Member
 
Group: Members
Posts: 39
Member No.: 2491
Joined: 11-May 06

|
Good day,
I created a MDI project and WinASM gave me some neat code to start off with.
I've added some code to the MDI child window procedure to add a control of class "RichEdit20A" during WM_CREATE.
| CODE | .ElseIf uMsg==WM_CREATE invoke CreateWindowEx,0,addr RichEditClass,NULL,WS_VISIBLE or ES_MULTILINE or WS_CHILD or WS_VSCROLL or WS_HSCROLL,0,0,300,300,hChild,RichEditID,hInstance,0 mov hwndRichEdit,eax
... |
When I resize the MDI child window, I enumerate through the child windows of the MDI child window and resize to the size of the parent MDI child window i.e. MDI > Child Window [resize] > RichEdit [resize].
| CODE | invoke EnumChildWindows, hChild,addr ChildEnumFunc,0
...
ChildEnumFunc proc hWnd:DWORD, lParam:DWORD invoke MoveWindow,hwndRichEdit,0,0,nWidth,nHeight,TRUE mov eax,TRUE Ret ChildEnumFunc EndP |
The problem is, when I have more than one MDI child windows open and I change the size, it changes the size of the Rich Edit control on the previously activated MDI child window.
Regards, George
|