MDI Form with MDI Child in referenced DLL 
Author Message
 MDI Form with MDI Child in referenced DLL

Does anybody know of a way to have a parent MDI form in a EXE project that
will allow you to have child MDI forms that are part of another DLL?

Anytime that I try to open the child form that is part of an accompanying
DLL I get an error saying there is no MDI form available.  If I open the
form in the DLL as a Non-MDI child there is no problem.

Any help would be appreciated.

Jeff



Fri, 16 Feb 2001 03:00:00 GMT  
 MDI Form with MDI Child in referenced DLL
not possible
i've tried it already


Fri, 16 Feb 2001 03:00:00 GMT  
 MDI Form with MDI Child in referenced DLL
You are right and wrong there. You can not have a form in a dll defined as
an MDI Child but you can load the form and then set it's parent and hook it
to make it react as a MDI Child. You also need to hook the Parent though
because the dll form isn't a true child. I can post sample code again if you
are interested. You could also look for my previous posts in DejaNews.

Glen



Sat, 17 Feb 2001 03:00:00 GMT  
 MDI Form with MDI Child in referenced DLL
It would be great if you could post some sample code.  I have no idea how to
get to the DejaNews you mentioned.

Thanks
Jeff Cleath

Quote:

>You are right and wrong there. You can not have a form in a dll defined as
>an MDI Child but you can load the form and then set it's parent and hook it
>to make it react as a MDI Child. You also need to hook the Parent though
>because the dll form isn't a true child. I can post sample code again if
you
>are interested. You could also look for my previous posts in DejaNews.

>Glen



Sat, 17 Feb 2001 03:00:00 GMT  
 MDI Form with MDI Child in referenced DLL
Go to your Internet browser and search for DejaNews. It's a web service that
archives ng messages. When you get there just search for the subject you
want info on. I'll post some sample code later today just in case you don't
find it.

Glen

Quote:

>It would be great if you could post some sample code.  I have no idea how
to
>get to the DejaNews you mentioned.

>Thanks
>Jeff Cleath



Sat, 17 Feb 2001 03:00:00 GMT  
 MDI Form with MDI Child in referenced DLL
Glen,

I was able to find your code in the DejaNews, but some of the references in
your code (for a lot of the declares) could not be found in the win32api
viewer.  Could you please include some sample code that maybe includes some
of the references needed.

Thanks
Jeff Cleath


Quote:
>Go to your Internet browser and search for DejaNews. It's a web service
that
>archives ng messages. When you get there just search for the subject you
>want info on. I'll post some sample code later today just in case you don't
>find it.

>Glen


>>It would be great if you could post some sample code.  I have no idea how
>to
>>get to the DejaNews you mentioned.

>>Thanks
>>Jeff Cleath



Sun, 18 Feb 2001 03:00:00 GMT  
 MDI Form with MDI Child in referenced DLL
I believe that I've included all the declares we use below. There might be a
few extras in there so don't worry if you see one that isn't in the code.

Glen

Public Type POINTAPI
        x As Long
        y As Long
End Type
Public Type MINMAXINFO
        ptReserved As POINTAPI
        ptMaxSize As POINTAPI
        ptMaxPosition As POINTAPI
        ptMinTrackSize As POINTAPI
        ptMaxTrackSize As POINTAPI
End Type
Public Const SC_CLOSE = &HF060
Public Const SC_NEXTWINDOW = &HF040
Public Const SC_PREVWINDOW = &HF050
Public Const WM_ACTIVATE = &H6
Public Const WM_ACTIVATEAPP = &H1C
Public Const WM_CHILDACTIVATE = &H22
Public Const WM_CLOSE = &H10
Public Const WM_GETMINMAXINFO = &H24
Public Const WM_GETTEXT = &HD
Public Const WM_GETTEXTLENGTH = &HE
Public Const WM_KEYDOWN = &H100
Public Const WM_KEYFIRST = &H100
Public Const WM_KEYUP = &H101
Public Const WM_KILLFOCUS = &H8
Public Const WM_MDIACTIVATE = &H222
Public Const WM_MDICASCADE = &H227
Public Const WM_MDICREATE = &H220
Public Const WM_MDIDESTROY = &H221
Public Const WM_MDIGETACTIVE = &H229
Public Const WM_MDIICONARRANGE = &H228
Public Const WM_MDIMAXIMIZE = &H225
Public Const WM_MDINEXT = &H224
Public Const WM_MDIREFRESHMENU = &H234
Public Const WM_MDIRESTORE = &H223
Public Const WM_MDISETMENU = &H230
Public Const WM_MDITILE = &H226
Public Const WM_MENUCHAR = &H120
Public Const WM_MOVE = &H3
Public Const WM_MOVING = &H216
Public Const WM_NCACTIVATE = &H86
Public Const WM_NCCALCSIZE = &H83
Public Const WM_NCPAINT = &H85
Public Const WM_PARENTNOTIFY = &H210
Public Const WM_SETFOCUS = &H7
Public Const WM_SETTEXT = &HC
Public Const WM_SHOWWINDOW = &H18
Public Const WM_SIZE = &H5
Public Const WM_SIZING = &H214
Public Const WM_SYSCHAR = &H106
Public Const WM_SYSCOMMAND = &H112
Public Const WM_SYSKEYDOWN = &H104
Public Const WM_SYSKEYUP = &H105
Public Const WM_WINDOWPOSCHANGED = &H47
Public Const WM_WINDOWPOSCHANGING = &H46
Public Const GW_CHILD& = 5
Public Const GWL_EXSTYLE = (-20)
Public Const GWL_STYLE& = (-16)
Public Const GWL_WNDPROC& = (-4)
Public Const WS_EX_MDICHILD = &H40&
Public Const WS_EX_WINDOWEDGE = &H100&
Public Const WS_MAXIMIZEBOX = &H10000
Public Const WS_MINIMIZEBOX = &H20000
Public Const WS_SYSMENU = &H80000
Public Const WS_THICKFRAME = &H40000
Public Const WS_CAPTION = &HC00000
Public Const WS_CLIPCHILDREN = &H2000000
Public Const WS_CLIPSIBLINGS = &H4000000
Public Const WS_CHILD = &H40000000
Public Const WS_OVERLAPPED = &H0&
Public Const WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED Or WS_CAPTION Or
WS_SYSMENU Or WS_THICKFRAME Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX)
Public Const MF_BYCOMMAND = &H0&
Public Const MF_BYPOSITION = &H400&
Public Const MF_ENABLED = &H0&
Public Const MF_SEPARATOR = &H800&
Public Const MF_STRING = &H0&
Public Const WA_INACTIVE = 0
Public Const WA_ACTIVE = 1
'Public Const WA_CLICKACTIVE = 2
'Public Const HWND_BROADCAST = &HFFFF&
Public Const FCONTROL = &H8
Public Const FALT = &H10
Public Const FNOINVERT = &H2
Public Const FSHIFT = &H4
Public Const FVIRTKEY = &H1 'True
' virtual key codes
Public Const VK_CONTROL = &H11
Public Const VK_F4 = &H73
Public Const VK_F6 = &H75
Public Const VK_TAB = &H9
Public Declare Function SetFocus Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function SetParent& Lib "user32" (ByVal hWndChild As Long,
ByVal hWndNewParent As Long)
Public Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function SetWindowLong& Lib "user32" Alias "SetWindowLongA"
(ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long)
Public Declare Function GetWindow& Lib "user32" (ByVal hwnd As Long, ByVal
wCmd As Long)
Public Declare Function SendMessage& Lib "user32" Alias "SendMessageA"
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As
Any)
Public Declare Function CallWindowProc& Lib "user32" Alias "CallWindowProcA"
(ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal msg As Long, ByVal
wParam As Long, ByVal lParam As Long)
Public Declare Function DefFrameProc Lib "user32" Alias "DefFrameProcA"
(ByVal hwnd As Long, ByVal hWndMDIClient As Long, ByVal wMsg As Long, ByVal
wParam As Long, ByVal lParam As Long) As Long
Public Declare Function DefMDIChildProc Lib "user32" Alias
"DefMDIChildProcA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As
Long, ByVal lParam As Long) As Long
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (hpvDest
As Any, hpvSource As Any, ByVal cbCopy As Long)
Public Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long,
ByVal bRevert As Long) As Long
Public Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal
hMenu As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal
lpNewItem As Any) As Long
Public Declare Function ModifyMenu Lib "user32" Alias "ModifyMenuA" (ByVal
hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal
wIDNewItem As Long, ByVal lpString As Any) As Long
Public Declare Function IsWindow Lib "user32" (ByVal hwnd As Long) As Long


Quote:
>Glen,

>I was able to find your code in the DejaNews, but some of the references in
>your code (for a lot of the declares) could not be found in the win32api
>viewer.  Could you please include some sample code that maybe includes some
>of the references needed.

>Thanks
>Jeff Cleath




Mon, 19 Feb 2001 03:00:00 GMT  
 MDI Form with MDI Child in referenced DLL
Thanks Glen,

I will try it out an let you know how it works.

Jeff



Tue, 20 Feb 2001 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Make a reference to a MDI form with a reference of a MDI child form

2. Q: Form activate Fires On Non Child MDI Forms But Only Once On Child Mdi Forms

3. Having MDI form with MDI Child form in DLL

4. set the MDI parent of MDI child forms that are in a DLL

5. Modifying object in MDI Parent form from MDI Child form

6. MDI-Child form and positon on MDI-form

7. Developing OLE MDI Child forms displayed on Control MDI Form

8. MDI child forms on top of a picture on a MDI form

9. Help with MDI Forms and MDI child forms

10. Modal non MDI forms and Modeless MDI child forms in VB 5.0

11. Allow MDI Child form to overlap Aligned Picture Box in MDI Form

12. Accessing Objects on a Mdi Parent form from a Mdi Child form

 

 
Powered by phpBB® Forum Software