WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
 

MDI - Child Window Resize, MDI - Child Window Resize Issue

georgek01
Quote Post


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

PMEmail Poster
Top
georgek01
Quote Post


Member
**

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


I found the problem.

In the MDI child window enumeration procedure I changed

invoke MoveWindow,hwndRichEdit,0,0,nWidth,nHeight,TRUE

to

invoke MoveWindow,hWnd,0,0,nWidth,nHeight,TRUE

PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google