

  '$ filename "t.exe"
  'uses RTL32
  'uses RTL64
  $ EscapeKeyEnd
  uses WinUtil


  'STANDARD CHILD WINDOWS STYLES
  ==============================
  '
  'Button	button.
  'ComboBox	combo box.
  'Edit	        edit box.
  'ListBox	list box.
  'MDIClient	MDI client window.
  'ScrollBar	scroll bar.
  'Static	static control.



  function WndProc(sys hwnd, uMsg, wParam, lParam) as long callback
  =================================================================
  indexbase 0
  RECT rcClient; 
  sys i,id,idmenu,style
  static sys hchw[0x200] 'child windows 
  string s,stys
 
  select umsg 
 
  case WM_CREATE

    idmenu=0
    '
    SetWindowText hwnd,"Edit Box Dynamic Resize"
    style=WS_CHILD | WS_BORDER | WS_VISIBLE
    stys="edit"
    hchw[0]=CreateWindowEx(0,stys, null, style, 0,0,0,0, hwnd, 100, hinst, null)
    hchw[1]=CreateWindowEx(0,stys, null, style, 0,0,0,0, hwnd, 101, hinst, null)
    ShowWindow(hchw[i], SW_SHOW)

  case WM_SIZE   // main window changed size 

    RECT rc
    GetClientRect(hwnd, &rc)
    'child window, position x,y  size x.y, show
    MoveWindow(hchw[0], 10,10, 200, 40, TRUE) 
    MoveWindow(hchw[1], 10,60, rc.right-20, rc.bottom-70, TRUE) 

  case WM_DESTROY: 
 
    PostQuitMessage 0 

  case else

    return DefWindowProc(hwnd, uMsg, wParam, lParam)
  end select
  '
  end function

   MainWindow 640,480,WS_OVERLAPPEDWINDOW

