Work-around for anyone else with this Child-window problem:
In mrwe.f, resize the parent window frame after creating the child window, which will force the child window to resize:
g_hWndChild = SendMessage(g_hWndClient,WM_MDICREATE, NULL_HANDLE,loc(mcs))
(other code here)
fresult = UpdateWindow(val(g_hWndChild))
fresult = ShowWindow (val(g_hWndChild), val(SW_SHOWNORMAL))
fresult = UpdateWindow(val(g_hWndFrame))
fresult= ShowWindow (val(g_hWndFrame), val(SW_SHOWMINIMIZED))
fresult = UpdateWindow(val(g_hWndFrame))
fresult = ShowWindow (val(g_hWndFrame), val(SW_SHOWNORMAL))
fresult = UpdateWindow(val(g_hWndFrame))
In frame.f, add a message handler to the frame to force child window resizing:
integer*8 w
integer*2 wi(4)
equivalence (w, wi(1))
integer*4 LOWORD, HIWORD
case (WM_DESTROY)
call PostQuitMessage(0)
return
case (WM_SIZE)
w=lParam
LOWORD=wi(1)
HIWORD=wi(2)
c instruct the child window to resize: deliberately 1 pixel down at the top, so
c the child window is not actually maximized, but looks that way :-)
i = MoveWindow(g_hWndChild, 0, 1, LOWORD, HIWORD-1, false)
case default
In child.f, child window message handler:
case (WM_CREATE)
(more code)
result = ShowWindow (val(g_hWndChild), val(SW_SHOWNORMAL))
result = SetWindowLongPtr(WndH, GWLP_USERDATA, p_txtInfo)
c force the child window to have the correct style
result = SetWindowLongPtr(WndH, GWL_STYLE, INT(WS_CHILD.OR.WS_VISIBLE,8) )