MDI Form Question

Started by Billy Reaves, February 13, 2006, 05:55:38 PM

Previous topic - Next topic

Billy Reaves

I have decide to convert an older program into a new FireFly project.

My old app has a mdi form and in that form it opens 4 different windows
all contained in the main form.  where do i need to place

hwndfirstwindow% =FirstWindow_Show(HWND_MDIFORM_MDICLIENT, %FALSE)

for each of the windows so that they will open after the main window starts.

I have done several FireFly apps but usually with just one form.

Thanks again.

Billy

TechSupport

You can put the code in the WM_CREATE of the MDIFORM:

Function MDIFORM_WM_CREATE ( _
                          hWndForm As Dword, _      ' handle of Form
                          ByVal UserData As Long _  ' optional user defined Long value
                          ) As Long

  Local hwndfirstwindow As Dword
  Local x               As Long
 
  For x = 1 To 4
     hwndfirstwindow = FirstWindow_Show( HWND_MDIFORM_MDICLIENT, %FALSE )
  Next
 
End Function


I noticed that you used an integer "%" for the hwndFirstWindow variable. You should use a dword (or a long) instead.

Also, you should probably display the Forms offset from each other so that they don't get displayed on top of each other.

Billy Reaves

Thanks Paul for your quick reply.

I will give it a try today.

Billy