Strange MDI behavior 
Author Message
 Strange MDI behavior

I am working on a large application that has several forms.  The main
interface is an MDI parent and I would like to pull some of the child
windows out into an OCX or a DLL.  I almost have the problem solved, but am
still facing one problem in that the child windows don't quite behave
correctly.  Is there an easy solution that I am missing or is this even
possible?
What I have so far is this:

1) MDI Parent loads the child form from the OCX using a method
LoadChildWindow(MDIParent.hwnd)
2) The code in the OCX reads something like:

        Dim llngReturn As Long
        Dim llngID As Long

        Load Child
        llngReturn = SetParent(Child.hwnd, aParentHWnd)
        DoEvents
        llngReturn = SetWindowLong(Child.hwnd, GWL_STYLE, WS_OVERLAPPEDWINDOW Or
WS_CHILD Or     WS_CLIPSIBLINGS)
        llngReturn = SetWindowPos(Child.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0,
SWP_NOSIZE Or SWP_NOMOVE Or     SWP_DRAWFRAME)
        DoEvents
        Child.Show

3) Everything looks fine except
        a) the child window does not have an active title bar
        b) it is always the topmost window in the MDI parent.

Is there any way to fix this behavior?
Thanks for any help,
Michael



Sat, 14 Oct 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Strange MDI behavior

2. MoveFirst, MoveLast strange behavior

3. Strange Subform Record Behavior

4. word mail merge strange behavior

5. Strange behavior with INT function

6. strange behavior

7. Strange behavior in Add-Ins

8. Strange Behavior

9. Strange Behavior with queries in code

10. V7 Strange behavior after text import.

11. Acc 97 Strange Table Behavior

12. Access 2.0-Strange behavior when using arrays and UPDATE command

 

 
Powered by phpBB® Forum Software