.elseif ax==idm_close invoke sendmessage,hwndclient,wm_mdigetactive,0,0 invoke sendmessage,eax,wm_close,0,0
if the user chooses "close" menuitem, we must obtain the handle of the currently active mdi child window first by sending wm_mdigetactive to the client window. the return value in eax is the handle of the currently active mdi child window. after that, we send wm_close to that window.
.elseif umsg==wm_close invoke messagebox,hchild,addr closepromptmessage,addr appname,mb_yesno .if eax==idyes invoke sendmessage,hwndclient,wm_mdidestroy,hchild,0 .endif
within the window procedure of the mdi child, when wm_close is received, it displays a message box asking the user if he really wants to close the window. if the answer is yes, we send wm_mdidestroy to the client window. wm_mdidestroy closes the mdi child window and restores the title of the frame window.